Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Markoversigt</title>
- <style>
- #input {
- background-position: 10px 10px;
- background-repeat: no-repeat;
- width: 46%;
- font-size: 16px;
- padding: 12px 20px 12px 40px;
- border: 1px solid #ddd;
- margin-bottom: 12px;
- }
- #oversigt {
- border-collapse: collapse;
- width: 100%;
- border: 1px solid #ddd;
- font-size: 18px;
- }
- #oversigt th,
- #oversigt td {
- text-align: left;
- padding: 12px;
- }
- #oversigt tr {
- border-bottom: 1px solid #ddd;
- }
- </style>
- <script src='//code.jquery.com/jquery-2.1.0.js'></script>
- <script>
- $(window).load(function () {
- // liste over markerne
- var itemsArray = [];
- itemsArray[0] = ["1-0", "12,44", "https://goo.gl/maps/bJEXBm8xSNJ2"];
- itemsArray[1] = ["1-1", "3,96", "https://goo.gl/maps/pXkXCdYw6Pv"];
- itemsArray[2] = ["3-0", "6", "https://goo.gl/maps/ooNtmudm9qH2"];
- itemsArray[3] = ["4-0", "6,75", "https://goo.gl/maps/jHZmsjhVKZ42"];
- itemsArray[4] = ["5-0", "6,87", "https://goo.gl/maps/bWmq4tcrHPQ2"];
- itemsArray[5] = ["6-0", "5,99", "https://goo.gl/maps/URDarqZWWgz"];
- itemsArray[6] = ["8-0", "4,13", "https://goo.gl/maps/GCbeP9T4tzF2"];
- itemsArray[7] = ["9-0", "1,75", "https://goo.gl/maps/tHqT8pXR8XT2"];
- itemsArray[8] = ["10-1", "4,64", "https://goo.gl/maps/ENqa9QKMCxD2"];
- itemsArray[9] = ["10-2", "4,19", "https://goo.gl/maps/fyKCuS1pFyJ2"];
- itemsArray[10] = ["11-1", "3,6", "https://goo.gl/maps/gXLw1WR2D4r"];
- itemsArray[11] = ["11-2", "3", "https://goo.gl/maps/xhpYKRRpj4M2"];
- itemsArray[12] = ["12-0", "3,53", "https://goo.gl/maps/p2d3Wv2VMh32"];
- itemsArray[13] = ["12-1", "5,34", "https://goo.gl/maps/M7rp7GyURty"];
- itemsArray[14] = ["14-0", "5,15", "https://goo.gl/maps/bPjtQvXUTTN2"];
- itemsArray[15] = ["15-0", "6,56", "https://goo.gl/maps/8aPFRSScZKL2"];
- itemsArray[16] = ["16-0", "4,53", "https://goo.gl/maps/PkgMEQJi8CD2"];
- itemsArray[17] = ["17-0", "5,14", "https://goo.gl/maps/uXuXqotVAcE2"];
- itemsArray[18] = ["18-0", "16,31", "https://goo.gl/maps/H7v4nkYjRok"];
- itemsArray[19] = ["36-0", "8,15", "https://goo.gl/maps/ZgBtdtru1Y42"];
- itemsArray[20] = ["37-0", "7,89", "https://goo.gl/maps/nSywDtp1jiu"];
- itemsArray[21] = ["20-1", "5,2", "https://goo.gl/maps/HZYZktpLPa22"];
- itemsArray[22] = ["21-0", "11,44", "https://goo.gl/maps/NMwmuqANtXk"];
- itemsArray[23] = ["22-1", "5,9", "https://goo.gl/maps/ucQWAE76NHN2"];
- itemsArray[24] = ["23-0", "4,43", "https://goo.gl/maps/8gECaruAMhJ2"];
- itemsArray[25] = ["24-0", "19,85", "https://goo.gl/maps/wzouAWZ26Lm"];
- itemsArray[26] = ["25-0", "18,6", "https://goo.gl/maps/j2PhsFPqdt32"];
- itemsArray[27] = ["51-0", "8,54", "https://goo.gl/maps/uo6ypBH68qF2"];
- itemsArray[28] = ["45-0", "19,92", "https://goo.gl/maps/KW4vBgMNUfq"];
- itemsArray[29] = ["43-1", "8,16", "https://goo.gl/maps/VbvFfSY3eGo"];
- itemsArray[30] = ["53-0", "8,15", "https://goo.gl/maps/56Ldf7S5BqP2"];
- itemsArray[31] = ["34-0", "2,95", "https://goo.gl/maps/uUSfy9h6o812"];
- itemsArray[32] = ["33-0", "8,77", "https://goo.gl/maps/Z8ZW4TDLbt92"];
- itemsArray[33] = ["48-1", "7,09", "https://goo.gl/maps/PHyHS8UcC822"];
- itemsArray[34] = ["48-2", "4,88", "https://goo.gl/maps/JKQK3FrYa6A2"];
- itemsArray[35] = ["50-1", "2,6", "https://goo.gl/maps/onV8uANtwfv"];
- itemsArray[36] = ["50-0", "8,1", "https://goo.gl/maps/Unewt6w6b5o"];
- itemsArray[37] = ["56-2", "6,17", "https://goo.gl/maps/mMJCYLBAd972"];
- itemsArray[38] = ["56-3", "2,13", "https://goo.gl/maps/sMWRudFJg8H2"];
- itemsArray[39] = ["32-0", "8,99", "https://goo.gl/maps/jgp5oWfWNC72"];
- itemsArray[40] = ["32-1", "2,07", "https://goo.gl/maps/wqLEHcs4iV12"];
- itemsArray[41] = ["48-1", "7,09", "https://goo.gl/maps/1rEGjkGMzyy"];
- itemsArray[42] = ["41-0", "11,56", "https://goo.gl/maps/RxtxJXWMKsr"];
- itemsArray[43] = ["68-1", "1,42", "https://goo.gl/maps/ixv5akBAzPR2"];
- itemsArray[44] = ["68-0", "5,28", "https://goo.gl/maps/RVbiyMTNR1J2"];
- itemsArray[45] = ["69-0", "3,59", "https://goo.gl/maps/kE9qTmrQ8Rv"];
- itemsArray[46] = ["67-0", "2,69", "https://goo.gl/maps/iQNJreXrdW82"];
- itemsArray[47] = ["68-2", "2,34", "https://goo.gl/maps/UAqxArdbtgS2"];
- itemsArray[48] = ["66-0", "7,08", "https://goo.gl/maps/i43QAXxYpzA2"];
- itemsArray[49] = ["64-0", "10,58", "https://goo.gl/maps/vaATQNmQxNt"];
- itemsArray[50] = ["65-0", "12,3", "https://goo.gl/maps/8xWnzjnaiiG2"];
- itemsArray[51] = ["70-0", "11,59", "https://goo.gl/maps/WBKr8nLTojB2"];
- itemsArray[52] = ["71-0", "8,73", "https://goo.gl/maps/MbKzznw9AoE2"];
- itemsArray[53] = ["61-0", "5,34", "https://goo.gl/maps/gWAJuaBEWLp"];
- itemsArray[54] = ["61-1", "4,16", "https://goo.gl/maps/mQx2ETmhL3M2"];
- itemsArray[55] = ["72-0", "8,34", "https://goo.gl/maps/16e6Tovw7VJ2"];
- var table = $('#oversigt');
- var row, cell;
- for (var i = 0; i < itemsArray.length; i++) {
- row = $('<tr />');
- table.append(row);
- for (var j = 0; j < itemsArray[i].length; j++) {
- var linkText = 'Google maps';
- var text = itemsArray[i][j];
- if (text.startsWith('https://'))
- row.append($('<td/>').html("<a href='" + text + "'>" + linkText + "</a>"));
- else {
- cell = $('<td>' + itemsArray[i][j] + '</td>')
- row.append(cell);
- }
- }
- }
- });
- </script>
- </head>
- <body>
- <h1>Markoversigt</h1>
- <input type="text" id="input" onkeyup="searchFunction()" placeholder="Søg.." title="søgning">
- <table style="width:50%" id="oversigt" align="center">
- <tr>
- <th>Mark nummer</th>
- <th>Hektar</th>
- <th>Link</th>
- </tr>
- </table>
- </body>
- <script>
- function searchFunction() {
- var input, filter, table, tr, td, i;
- input = document.getElementById("input");
- filter = input.value.toUpperCase();
- table = document.getElementById("oversigt");
- tr = table.getElementsByTagName("tr");
- for (i = 0; i < tr.length; i++) {
- td = tr[i].getElementsByTagName("td")[0];
- if (td) {
- if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
- tr[i].style.display = "";
- } else {
- tr[i].style.display = "none";
- }
- }
- }
- }
- </script>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement