按纽灰掉失效,高手帮忙!

lawdoor 2004-03-30 11:53:05
要实现的效果:选择111则hehe灰掉,选择222则haha灰掉!
<form name=f>
<input name="RIGHT_TYPE" type="radio" value="1">111
<input name="RIGHT_TYPE" type="radio" value="2">222
<form>
<br>
<form name=form>
<input type="button" name="haha" value="haha">
</form>
<br>
<form name=form1>
<input type="button" name="haha" value="hehe">
</form>
...全文
41 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
gzwuyh 2004-03-31
  • 打赏
  • 举报
回复
指明form就行了.
onclick="form.haha.disabled=false;form1.hehe.disabled=true;">111
onclick="form.haha.disabled=true;form1.hehe.disabled=false;">222

ken1 2004-03-31
  • 打赏
  • 举报
回复
楼上说的对,不过偶觉得还是 afoskoo(暂停打印)
说的最好。
lawdoor 2004-03-30
  • 打赏
  • 举报
回复
是必须放在那么多的<form>中!
gzwuyh 2004-03-30
  • 打赏
  • 举报
回复
如要那么多form?这样就行了!
<form name=f>
<input name="RIGHT_TYPE" type="radio" value="1" onclick="haha.disabled=false;hehe.disabled=true;">111
<input name="RIGHT_TYPE" type="radio" value="2" onclick="haha.disabled=true;hehe.disabled=false;" >222<BR>
<input type="button" name="haha" value="haha" disabled><BR>
<input type="button" name="hehe" value="hehe" disabled>
</form>
afoskoo 2004-03-30
  • 打赏
  • 举报
回复
<input name="RIGHT_TYPE" type="radio" value="1" onclick="form.haha.disabled=this.checked">111
lawdoor 2004-03-30
  • 打赏
  • 举报
回复
我求的就是js代码,
888228 2004-03-30
  • 打赏
  • 举报
回复
把相关的JS代码也贴出来吧.
白雲 2004-03-30
  • 打赏
  • 举报
回复
一样了,只是要指明是那个FORM就行了.
如:
document.form1.haha.disabled=true
document.form.haha.disabled=false
andiy 2004-03-30
  • 打赏
  • 举报
回复
haha.Endbled=true
lawdoor 2004-03-30
  • 打赏
  • 举报
回复
要实现的效果:选择111则gg和hehe灰掉,选择222则hh和haha灰掉!
整个问题是这样的!
<form name=f>
<input name="RIGHT_TYPE" type="radio" value="1">111
<input name="RIGHT_TYPE" type="radio" value="2">222
<input type="button" name="hh" value="hh">
<input type="button" name="gg" value="gg">
<form>
<br>
<form name=form>
<input type="button" name="haha" value="haha">
</form>
<br>
<form name=form1>
<input type="button" name="haha" value="hehe">
</form>
lawdoor 2004-03-30
  • 打赏
  • 举报
回复
各位高手,程序是放在放在不同的<form>中!我只是简化了页面内容!·
如果是处在不同的form中该如何解决呀,

87,907

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧