Transformator

html002

Apr 7th, 2014
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.54 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html lang="de">
  3. <head>
  4.     <title>D0wnl04dL1nk</title>
  5.     <meta charset="utf-8">
  6.     <link rel="stylesheet" href="style.css">
  7.     <script src="jquery.js"></script>
  8. </head>
  9.  
  10. <body>
  11.  
  12. <main>
  13.     <header>
  14.         <h1>D0wnl04d L1nk</h1>
  15.     </header>
  16.     <div id="sidebarUcontent">
  17.         <aside>
  18.             <section class="widget" id="suche">
  19.                 <input type="search" id="search" list="datalist">
  20.                 <input type="button" id="submit" value="Suchen" onclick="search();">
  21.             </section>
  22.             <section class="widget">
  23.                 <p>Beliebte Donwloads</p>
  24.                 <hr>
  25.                 <p><a href="?page=downloadChrome" class="listobjekt">Google Chrome</a></p>
  26.             </section>
  27.         </aside>
  28.         <article id="content">
  29.             <p>Hier Findest du jeden Download Link den du suchst !</p>
  30.         </article>
  31.     </div>
  32. </main>
  33. <script>
  34.     var params=document.URL.split("?page")[1];
  35.     var par1=0;
  36.     if (params != null ) try { par1=params[1]; } catch (e) {}
  37.     switch (par1) {
  38.         case "downloadChrome" :
  39.             $("#content").html
  40.             (
  41.                 "<h1>Google Chrome</h1><a href='#'>Google Chrome Herunterladen</a>"
  42.             );
  43.             break;
  44.         default:
  45.             $("#content").html
  46.             (
  47.                 "<h1>Startseite</h1>"
  48.             );
  49.             break;
  50.     }
  51.  
  52.     // Such Funktion
  53.     function search() {
  54.         var search = $("#search").val();
  55.  
  56.         if( search.indexOf("Chrome") != -1 ) { window.location = "?page=downloadChrome"; }
  57.         else if( search.indexOf("chrome") != -1 ) { window.location = "?page=downloadChrome"; }
  58.  
  59.         else { window.location = "?page=normal"; }
  60.     }
  61. </script>
  62. <datalist id="datalist">
  63.     <option value="Google Chrome">
  64. </datalist>
  65. </body>
  66. </html>
Advertisement
Add Comment
Please, Sign In to add comment