Burti adlı üyeden alıntı: mesajı görüntüle
<select name="type" id="tip" onchange="detectType()">
   <option>seçiniz</option>
   <option value="1">Dosya</option>
   <option value="2">Yazı</option>
</select>
<input id="hop" type="text" name="password" />

<script>
   function detectType(){
        var thisVal = document.getElementById("tip").value;
        if(thisVal == 1){
            document.getElementById("hop").type = 'file';
        } else if (thisVal == 2){
            document.getElementById("hop").type = 'text';
        }
   }
</script>