function change_dis(str){
document.form[str].disabled=false;
}改成这样即可。
document.form[str].disabled=false;
}改成这样即可。
解决方案 »
- PHP中不会用验证用户功能
- php安全问题,用index.PHP作为网站的首页是否安全?
- 初学PHP者该如何入门
- javascript动态生成input,然后提交表单,但是处理页面收不到动态生成的input的值!
- 页面刷新问题
- php+mysql优化搜索引擎的搜索结果【有酬】
- 如何使用preg_replace替换功能?
- 我在test111.php中给两个session赋了值,按道理说,应该可以在test222.php中读出来,可是去不行,为什么?谢谢!
- 关于多表查询的问题
- 写好简易后台生成TXT文本内容不分行乱码求大神看看那里需要修改
- PHP新手,请教一个问关于echo的输出问题
- 求救:DISCUZ4.0 admin 登录不了论坛,登上了马上又出来了
document.form[str].style.disabled=false;
}
function change_dis(str){
document.form[str].disabled=false;
}
应该这样
function change_dis(str){
document.form[str].style.disabled=false;
}
document.form[str].disabled=false;
}
是对的
我看了上面你們的發言,我不太懂javascript,[]是不是把它們當作數組看待呀,
javascrtip裏的key可以是字符嗎?javascript數組的key可以是字符嗎?
<head><title>Test</title>
<script language="javascript">
<!--
function change_dis(id){
document.getElementById(id).disabled = true;
}
//-->
</script>
</head><body>
<form name="form1" method="post" action="xxx.php">
<input type="text" id="text1" name="text1">
</form><input type="button" id="button1" value="Click Me" onclick="change_dis('text1');">
</body>------------------------
IE 和 FireFox下面测试通过