php,html,在写完第一个单词之后将选择更改为选择性,依此类推

this is the select.

<select name='select_name'>
     <option value='1'>one</option>
     <option value='2'>tow</option>
     <option value='3'>three</option>
     <option value='4'>fore</option>
    //here i have more then 300 select which i will fetch from database
</select>

i want to change it input so when i write the first later it fetch me the match items and so on if the secound later it match as i write. if is possible please write me hint so i could save my time.

for example if i write (t) it will show me

tow
three

regards

You're looking for a combo box. If you don't want to write it from scratch, you could use a plugin instead.

In this example is Select2 Plugin:

Example:

<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/select2/3.2/select2.css" />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/select2/3.2/select2.min.js"></script>
<select name='select_name' style="width:300px">
    <option value='1'>one</option>
    <option value='2'>two</option>
    <option value='3'>three</option>
    <option value='4'>four</option>
    <option value='5'>five</option>
</select>
<script type="text/javascript">
$(document).ready(function(){
    $('select[name="select_name"]').select2();
});
</script>

Demo