Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp classic 在经典asp中获取复选框的自定义属性值_Asp Classic - Fatal编程技术网

Asp classic 在经典asp中获取复选框的自定义属性值

Asp classic 在经典asp中获取复选框的自定义属性值,asp-classic,Asp Classic,我需要经典asp中“compid”自定义属性的值 下面是复选框 <input type="checkbox" name="chk" value="238774" compid="1367" id="1" /> 谢谢我认为经典ASP不可能做到这一点,因为表单只会发布名称和值字段,但如果要这样做: <input type="checkbox" name="chk" value="238774|1367" id="1" /> 然后在代码中使用如下代码 <%

我需要经典asp中“compid”自定义属性的值

下面是
复选框

<input type="checkbox" name="chk" value="238774" compid="1367" id="1" />


谢谢

我认为经典ASP不可能做到这一点,因为表单只会发布名称和值字段,但如果要这样做:

<input type="checkbox" name="chk" value="238774|1367" id="1" />

然后在代码中使用如下代码

<%

both_vals = Request("chk")

value = Split(both_vals)(0)
compid = Split(both_vals)(1)


%>


然后,您可以在变量中使用这两个值,

除了其他答案之外,您还可以使用隐藏字段

 <input type="checkbox" name="chk" value="238774" id="1" />
 <input type="hidden" name="compid-238774" value="1367" />

您是否使用代码隐藏?如果是,请告诉我们,您尝试了什么?经典ASP没有代码隐藏
iCompID = Request( "compid-" & iCheckValue )