wpps[]是数组的写法,怎么用来做名称了?
控件名称只能是英文字母和数字组成。<input type="checkbox" name="wpps">
<input type="checkbox" name="wpps">
<input type="checkbox" name="wpps">
<input type="button" name="" value="第一个打勾" onClick="wpps[0].checked=true">
控件名称只能是英文字母和数字组成。<input type="checkbox" name="wpps">
<input type="checkbox" name="wpps">
<input type="checkbox" name="wpps">
<input type="button" name="" value="第一个打勾" onClick="wpps[0].checked=true">
你这个名字是wpps[]的控件是非法命名,不可以这样命名的。
就像文件名也不能随便乱取一样的道理!
<HTML>
<HEAD>
<TITLE> Q2378358 </TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="Generator" CONTENT="Microsoft Notepad">
<META NAME="Author" CONTENT="吴雷">
<META NAME="Keywords" CONTENT="http://expert.csdn.net/Expert/topic/2378/2378358.xml">
<META NAME="Description" CONTENT="Re: Q2378358">
</HEAD><BODY bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
<center>VBScript</center>
1<Input Type="checkbox" Name="a" Value="1"><br>
2<Input Type="checkbox" Name="a" Value="2"><br>
3<Input Type="checkbox" Name="a" Value="3"><br>
4<Input Type="checkbox" Name="a" Value="4"><br>
5<Input Type="checkbox" Name="a" Value="5"><br>
6<Input Type="checkbox" Name="a" Value="6"><br>
<Input Type="button" NAME="but" Value="选1、3" onClick="aaa()">
<Input Type="button" NAME="but" Value="全选" onClick="bbb()">
<Input Type="button" NAME="but" Value="反选" onClick="ccc()">
<Script Language="VBScript">
Function aaa()
a(0).Checked = True
a(2).Checked = True
End FunctionFunction bbb()
For Each i In a
i.Checked = True
Next
End FunctionFunction ccc()
For Each i In a
If i.Checked Then
i.Checked = False
Else
i.Checked = True
End If
Next
End Function
</Script>
</BODY>
</HTML>
top.tp.form1["wpps[]"][i].checked=1