动态输入框的三个函数

<%
FunctioncTextBox(name,value,size)
Response.Write"<inputtype=textname='"&name&"'value='"&value&"'size='"&size&"'>"&vbcrlf
Response.WritecTextBox("NAME","1","12")&vbcrlf
EndFunction
FunctioncCheckBox(name,value,checked)
Response.Write"<inputtype=checkboxname='"&name&"'value='"&value&"'"
Ifchecked=1ThenResponse.Write"CHECKED"
Response.Write">"
EndFunction
FunctioncRadio(name,value,checked)
Response.Write"<inputtype=radioname='"&name&"'value='"&value&"'"
Ifchecked=1ThenResponse.Write"CHECKED"
Response.Write">"
EndFunction
%>
<html>
<body>
<%
'justdeclaringacoupleofstaticvariableshere,
'butyoucancreatecbnameandcbvalueanywayyoulike.
'usearecordset,orRequestcollectiontoo:
cbname="checkbox_name"
cbvalue="act"

Response.Write"MyCheckbox:"&cCheckBox(cbname,cbvalue,1)&""

'or,writearadiobuttonlikethis:
Response.WritecRadio(cbname,cbvalue,1)

%>
</body>
</html>

你可能感兴趣的:(html)