checkbox取值是什么?是布尔值么?
<form method= "post " name= "press " id= "press ">
<input name= "press " type= "checkbox " id= "press " value= " " />
</form>
<%
press=request.Form( "press ")
response.Write(press)
%>
_______________________________________________________________________
为什么什么都没有输出?
还有vbscript的数据类型之间怎么转换?特别是tostring()有么?
------解决方案--------------------因为value是 " "
------解决方案--------------------这里不需要转换,你在checkbox上不设置选定值,你获取的就是空值,得到的值是你设置的value值.
------解决方案--------------------如:
<input name= "press " type= "checkbox " id= "press " value= "a " />
提交时,如果这个checkbox被勾选的话,那么
request.form( "press ")得到的就是 "a ",如果checkbox提交时没有被勾选的话,那么它的值就不会被提交,
那么request.form( "press ")也得不到值
------解决方案-------------------- <form method= "post " name= "press " id= "press ">
还要加上action属性
<form method= "post " name= "press " id= "press " action= "abc.asp ">
------解决方案--------------------我怎样获得是否被勾选?
chickboxname.check == true