Search system on the site itself, such as linking so many pages and recognizing the characters typed [closed]

1

I have a search bar here, however how do I search my htmls in my own pc directory?

function executar(){	
  var tx= document.getElementById('tx').value;
  var lista = document.getElementById('ht');
  var adicionar= true;
  var opt = document.createElement('option');

   for(i=0; i <lista.options.length;i++){
   	if(tx==lista.options[i].value){
   		adicionar=false;
   	}
   }
   if(adicionar==true){
   	opt.value=tx;
   	lista.appendChild(opt);
   }
} 
.ps{ width: 400px;
	height: 40px;
	margin: 200px auto;

}
#tx{ width: 350px;
	height: 40px;
	float: left;
	font-family: 'Arial';
	font-size: 20px;

}
.bt{ width: 30px;
	height: 30px;
	background-color: #2f4550;
	padding: 5px 10px;
	cursor: pointer;

}
#tx:focus{ border:2px solid #2f4550;

}
<form class="ps">
	<input type="search" id="tx" list="ht" placeholder="pesquisar">
	<img src="" class="bt" onclick="executar()">
<datalist id="ht">
	<option value="Css"></option>
	<option value="Games"></option>
	<option value="Html"></option>
	<option value="C++"></option>
</datalist>	
</form>
    
asked by anonymous 29.05.2018 / 23:03

0 answers