楼主,你的描述我看不懂,举个例子
例如:
a:<input type="radio" name="M11" >A
b:<input type="radio" name="M11" >B
c:<input type="radio" name="M11" >C
d:<input type="radio" name="N18" >A
e:<input type="radio" name="N18" >B
f:<input type="radio" name="N18" >C
g:<input type="radio" name="N71" >A
h:<input type="radio" name="N71" >B
i:<input type="radio" name="N71" >C
我点击a:那么哪几个变,值都是空的怎么变?变成什么?
例如:
a:<input type="radio" name="M11" >A
b:<input type="radio" name="M11" >B
c:<input type="radio" name="M11" >C
d:<input type="radio" name="N18" >A
e:<input type="radio" name="N18" >B
f:<input type="radio" name="N18" >C
g:<input type="radio" name="N71" >A
h:<input type="radio" name="N71" >B
i:<input type="radio" name="N71" >C
我点击a:那么哪几个变,值都是空的怎么变?变成什么?
你javascript水平如何?
假如我点击a,那么d和g也跟着自动选中
假如我点击b,那么e和h也跟着自动选中
+
for循环判断是否M
r.name.charAt(0)=='M'然后r.click
然后在javascript里直接用document.getElementById("**")
**为你要操作的标签(javascript里认为是对象object)的id,注意大小写比如你想id="a"的选中后,b,c都选中的话
应该写成if (document.getElementById("a").checked=true){
document.getElementById("b").checked=true;
document.getElementById("c").checked=true;
}
在这段代码外面加上一个fuction checkradio(){}用radio的onchange来调用就好了
希望你能根据自己需要改出可行的代码
原来这和innerText、innerHTML一样都有一对的学到东西了,呵呵