如何当选中一个单选按钮时,使某个文本框不能输入 控制写在radio控件的onclick事件里(2个都加),text控件加name属性以便访问 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 小弟刚学javascript还不太清楚,请各位大侠把完整代码写出来 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>无标题文档</title></head><body><p> <input type="text" name="textfield"></p><p> <input name="radiobutton" type="radio" value="radiobutton" onCLick="document.all.textfield.disabled=true"> 不可用 <input type="radio" name="radiobutton" value="radiobutton" onCLick="document.all.textfield.disabled=false"> 可用</p></body></html> 现在出现新情况,请各位大侠指教:在<html:radio value="no" property="radio" />控件的onclick事件里写了:<script>function check(){document.Form.bs.disabled=ture;}</script>另一个radio控件是:document.Form.bs.disabled=false;可以实现选radio为no时文本框bs不能输入。但此页面提交操作成功后 , 弹出alert("操作成功!"), 点确定后此页面上radio还是no,但这时bs能输入了。 要如何解决这问题??? <script> function unCheckRadio() { var p = document.getElementsByTagName("INPUT") for (i=0;i<p.length;i++) { if (p[i].type == "radio") { p[i].checked = false } } }</script><body onload="unCheckRadio()"> Javascript in函数 关于jquery得到列表id的问题 【严重求助!!!】有两个特效想合为一体,出现问题,求解决!!! 困饶我很久的图片切换问题 求助:下拉框事件触发的问题~ 在 JavaScript 中说明指定事件处理程序 js统计问题 <body onload="init()"> 判断文本框中是一个整数 如果你在一个窗口里面用 javascript打开了一个窗口!然后在里面设置了一些参数,然后关闭这个窗口!我想知道如何在它的父窗口中调用这些参数!不要用submit的方法! 急!!!!!iframe层怎样才能在父页上面?? 知道请解答:“关于按钮与数据库的问题?”
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title></head><body>
<p>
<input type="text" name="textfield">
</p>
<p>
<input name="radiobutton" type="radio" value="radiobutton" onCLick="document.all.textfield.disabled=true">
不可用
<input type="radio" name="radiobutton" value="radiobutton" onCLick="document.all.textfield.disabled=false">
可用</p>
</body>
</html>
<script>
function check()
{document.Form.bs.disabled=ture;}
</script>
另一个radio控件是:document.Form.bs.disabled=false;
可以实现选radio为no时文本框bs不能输入。
但此页面提交操作成功后 , 弹出alert("操作成功!"), 点确定后此页面上radio还是no,
但这时bs能输入了。 要如何解决这问题???
function unCheckRadio() {
var p = document.getElementsByTagName("INPUT")
for (i=0;i<p.length;i++)
{
if (p[i].type == "radio")
{
p[i].checked = false
}
}
}
</script>
<body onload="unCheckRadio()">