asp如何把多个checkbox或input的值添加到一个字段中?

来源:百度知道 编辑:UC知道 时间:2024/06/06 05:42:12
rt
字符串应该如何相接啊?

把每个input的name属性设为一样的
request.form("name")
接受过来的值默认用逗号和空格分隔的,replace掉里面的逗号和空格,给个例子
<%
a=request.form("abc")
b=replace(replace(a," ",""),",","")
response.write b
%>
<form action="" method="post">
<input type="text" name="abc">
<input type="text" name="abc">
<input type="text" name="abc">
<input type="text" name="abc">
<input type="submit" value="send">
</form>