< >

selectmenue_inhalt_mit_axas_laden.php


Quell Code


 
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
 
body{
    width:100%;
    height:100%;
    margin:0;
    padding:0;  
    background: green;
	background: -webkit-linear-gradient(to right, #0000ff, #00ff00);
	background: linear-gradient(to right, #0000ff, #00ff00);
 text-align:center;
}

 
 h2{
 text-align:center;
 width:80%;
 margin-left:10%;
 }
 
 
 
 select,input,p{
  margin-top:5px;
  width:300px;
  height:25px;
  font-size:20px;
 
  color:red;
 
}
 
 
 #con{
 margin-top:200px;
 }
 
 #aus{
 font-size:60px;
 color:black;
 width:100%;
 text-align:center;
 }
 #mm{
 display:none;
 width:100%;
 }
#op{
margin:100px 0px 0px 0px;
width:400px;
height:35px;
box-shadow:2px 2px 2px red;
padding:2px;
} 
</style>
 <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js"></script>
 
 </head>
 
<body>

 <h2>Lade Textdate in Arrays.<br>Mittels Textfeld wird in der Datei nach übereinstimmungen gesucht.<br>Achtung das ist eine Bad Wort Liste und beinhaltet nur Beleidigungen</h2>
<div id="con"><input type="text" id="go" placeholder="suchtext zb 5" value="">


<div id="k"></div><br><br><div id="mm"><p id="aus"></p><input type="button" id="op" value="Dieses Suchwort für Google Nutzen ?"></div></div>
<script>









          $.ajax({
              type: "GET",
              async: false,
              url: "bad.txt",
              success: function(msg){
 function start(){             
              arra = msg.split("\n");
            
//arra=['5','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','2','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','160','61','62','63','64','65','66','67','68','69','70','71','72','73','74','7','76','77','78','79','80','81','82','83','84','85','86','87','88','89','90','91','92','93','94','95','96','0','98','99','100'];
su=document.getElementById('go').value;
 var h;
g=arra.length-1;
h='<select id="test">';
for(n=0;n<=g;n++){
 var j=arra[n];
 var o=j.indexOf(su);
  if(o!=-1){
 h+='<option value="'+j+'"><p>'+j+'</p></option>';
  }
}
h+='</select>';
document.getElementById('k').innerHTML=h;
$('#test').on("change",function(){
 
hj=$('#test').val();
$('#mm').css('display','block');
$('#aus').html('Deine auswahl ist<br>'+hj);
$('#op').click(function(){
    window.open( 'https://www.google.de/search?q=' + hj, '_blank');
});
});
}
go.oninput=start;
  }});





</script>

</body>
</html>