<script language="javascript">
<!--
function uPowerChech(text){
var arr=text.split(",")
var o=document.getElementsByTagName('INPUT');
for(var i=0;i<arr.length;i++)
{
for(var j=0;j<o.length;j++)
{
if(arr[i] == o[j].value) o[j].checked = true;
}
}
}//-->
</script><input type=checkbox value=a1 id=c>
<input type=checkbox value=a2 id=c>
<input type=checkbox value=b1 id=c>
<input type=checkbox value=b2 id=c><input type=button value=change onclick="uPowerChech('a1,a2,b1');">
<!--
function uPowerChech(text){
var arr=text.split(",")
var o=document.getElementsByTagName('INPUT');
for(var i=0;i<arr.length;i++)
{
for(var j=0;j<o.length;j++)
{
if(arr[i] == o[j].value) o[j].checked = true;
}
}
}//-->
</script><input type=checkbox value=a1 id=c>
<input type=checkbox value=a2 id=c>
<input type=checkbox value=b1 id=c>
<input type=checkbox value=b2 id=c><input type=button value=change onclick="uPowerChech('a1,a2,b1');">
问题解决,谢了。
现在结帖了。