ASP获取复选框(多项选择)的值

 提交页

 


< input  type ="checkbox"  name ="test"  value ="打球" >
< input  type ="checkbox"  name ="test"  value ="打人" >
< input  type ="checkbox"  name ="test"  value ="打飞机" >
< input  type ="checkbox"  name ="test"  value ="打屁" >
< input  type ="checkbox"  name ="test"  value ="打酱油" >

 

接受页

 

<
dim  test 
test
= Split (request.from( " test " ), " "
' 取值的时候 
Response.Write test( 0
Response.Write 
" "  
Response.Write test(
1
Response.Write 
" "  
Response.Write test(
2
' …… 
Response.Write  " "  

' 循环取值/操作 
For  I = 0   To   UBound (test) 
Response.Write test(I) 
Response.Write 
" "  
Next  
%
>  

你可能感兴趣的:(技术文章)