<!DOCTYPE html>
<html>
<body>
<%
fruits=Request.Form("fruits")
%>
<form action="demo_checkboxes.asp" method="post">
<p>你喜欢的水果是:</p>
<input type="checkbox" name="fruits" value="Apples"
<%if instr(fruits,"Apple") then Response.Write("checked")%>>
苹果
<br>
<input type="checkbox" name="fruits" value="Oranges"
<%if instr(fruits,"Oranges") then Response.Write("checked")%>>
橙子
<br>
<input type="checkbox" name="fruits" value="Bananas"
<%if instr(fruits,"Banana") then Response.Write("checked")%>>
香蕉
<br>
<input type="submit" value="提交">
</form>
<%
if fruits<>"" then%>
<p>你喜欢的<%Response.Write(fruits)%></p>
<%end if
%>
</body>
</html>