可在百度中搜尋
<input type="CHECKBOX" name="Soft" checked alue="ON">ASP
<input type="CHECKBOX" name="Soft" value="ON"> PHP
<input type="CHECKBOX" name="Soft" value="ON"> JSP
response.write request("Soft")
split(request("Soft"),",")
如果三個複選框都選中,顯示的值為ASP,PHP,JSP
<input type=radio name=r1 value="ssss" checked>
<input type=radio name=r1 value="dddd" >
擷取值為ssss
<input type=checkbox name=r1 value="ssss" checked>
<input type=checkbox name=r1 value="dddd" checked>
<input type=checkbox name=r1 value="eeee" >
擷取值為"ssss,dddd"
=================================================================================================
<input name="allbox" type="checkbox" value="Check All" onClick="CheckAll();">
<script language="JavaScript">
<!--
function CheckAll()
{
for (var i=0;i<document.form.elements.length;i++)
{
var e = document.form.elements[i];
if (e.name != 'allbox')
e.checked = document.form.allbox.checked;
}
}
//-->
</script>
<td width="40" align="center"><center><input type="checkbox" name="Deletethis" value="<%=rs("id")%>"></center></td>
<input type="submit" name="Delete" value="刪除選中記錄">
If Request("Delete")="刪除選中記錄" Then
strSql = "select * from " & mtable & " where jzbz='1' and year='" & myear & "' and month='" & mmonth & "' and tsfl=" & mzzfl_id & " order by id desc"
set rs1 = Conn.execute(strSql)
if rs1.eof and rs1.bof then
'沒有記帳,可以刪除"
For Each item in Request("Deletethis")
sql="DELETE FROM " & mtable & " WHERE id=" & CINT(item)
conn.Execute(sql)
Next
else
merror="本月已記帳,不要刪除"
end if
rs1.close
set rs1=nothing
End If
=======================
<input type="radio" checked="<%=check_val(rs("value"))%> value="<%=rs("value")%>">
<%
function check_val(str)
if str<>"" then
response.write"checked"
end if
end function
%>