程序代碼
<%
Function CheckBoxScript(ByVal FormElement
CheckBoxScript = "<scr" & "ipt language=""javascript"" type=""text/Javascript"">" & vbCrLf & "String
CheckBoxScript = CheckBoxScript & "ReallyDo=function(){return this
CheckBoxScript = CheckBoxScript & "var Jorkin = """ & ElementValue & """
CheckBoxScript = CheckBoxScript & "for (i =
CheckBoxScript = CheckBoxScript & " for (j =
CheckBoxScript = CheckBoxScript & " if (Jorkin[j]
CheckBoxScript = CheckBoxScript & " " & FormElement & "[i]
End Function
%>
例子:
程序代碼
<form name="Form
<input name="ReallyDo" type="checkbox" id="ReallyDo
<input name="ReallyDo" type="checkbox" id="ReallyDo
<input name="ReallyDo" type="checkbox" id="ReallyDo
<input name="ReallyDo" type="checkbox" id="ReallyDo
<input name="ReallyDo" type="checkbox" id="ReallyDo
</form>
<%=CheckBoxScript("Form
From:http://tw.wingwit.com/Article/program/net/201311/14191.html