日期:2014-05-16  浏览次数:20406 次

用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();