sample2.asp
<html>
<body>
<%
=request.form("check")
%>
</body>
</html> Out Put
หากคุณไม่ได้ทำการคลิกเลือก Out Put จะได้เป็นค่าว่างเปล่า
,มาดูตัวอย่าง การตรวจสอบ Check Box ด้วย on และ Off ด้วยเงื่อนไข If sample1.asp
<html>
<body>
<form name="form1" method="post" action="sample2.asp">
<input type="checkbox" name="check" >
<br>
<input type="submit" name="Submit" value="Submit">
</form>
</body>
</html> Out Put
sample2.asp
<html>
<body>
<%
check=request.form("check")
if check="on" then
response.write("คุณได้ทำการเลือก")
else
response.write("คุณไม่ได้เลือก")
end if
%>
</body>
</html>
Out Put
sample2.asp
<html>
<body>
<%
old=request.form("old")
select Case old
case "1" : response.write("1-5")
case "2" : response.write("6-10")
case "3" : response.write("11-15")
case "4" : response.write("16-20")
case "5" : response.write("21 ขึ้นไป")
end select
%>
</body>
</html> Out Put
8.List Menuใช้กำหนดให้มีการเลือกอย่างใดอย่างหนึ่ง เหมือนกับ Radio Button ที่จะดูเรียบง่าย และประหยัดเนื้อที่มากกว่า Radio Button การอ่านค่าจาก Element ของ List Menu