您现在的位置是:首页 > 电脑技术查询 > web开发

用prototype.js怎樣動態隱藏某個文本框?该怎么处理

编辑:chaxungu时间:2022-10-02 23:22:26分类:web开发

用prototype.js怎樣動態隱藏某個文本框?
<script src= "prototype.js "> </script>
<form id= "form1 " name= "form1 " method= "post " action= " ">
<input type= "text " id= "text " name= "text " />
<input type= "button " id= "go " value= "go " />
</form>
<script>
Event.observe($( 'go '), 'click ', function(event) {
hide( 'text ');
});

</script>
為什麼不行?

------解决方案--------------------
Element.hide( 'text ');

或者

$( 'text ').hide();