首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

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

2012-02-12 
用prototype.js怎樣動態隱藏某個文本框?scriptsrc prototype.js /scriptformid form1 name f

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

热点排行