使用單選按鈕的表單

代碼:

<!DOCTYPE html>

<html>

<%

dim cars

cars=Request.Form("cars")

%>

<body>

<form action="demo_radiob.asp method="post">

<p>Please select your favorite car:</p>

 

<input type="radio" name="cars"

<%if cars="Volvo" then Response.Write("checked")%>

value="Volvo">Volvo</input>

<br>

<input type="radio" name="cars"

<%if cars="Saab" then Response.Write("checked")%>

value="Saab">Saab</input>

<br>

<input type="radio" name="cars"

<%if cars="BMW" then Response.Write("checked")%>

value="BMW">BMW</input>

<br><br>

<input type="submit" value="Submit" />

</form>

<%

if cars<>"" then

   Response.Write("<p>Your favorite car is: " & cars & "</p>")

end if

%>

</body>

</html>

結(jié)果:

相關(guān)文章
亚洲国产精品第一区二区,久久免费视频77,99V久久综合狠狠综合久久,国产免费久久九九免费视频