<html><body><form name="form" method="post" action="5-1.asp"> <p> 姓名: <input type="text" name="textfield"></p> <p>性别: <input type="radio" name="radiobutton" value="男"> 男 <input type="radio" name="radiobutton" value="女"> 女 </p> <p>爱好: <label> <input type="checkbox" name="checkbox" value="1" /> 看小说</label> <label> <input type="checkbox" name="checkbox" value="2" /> 听音乐</label> <label> <input type="checkbox" name="checkbox" value="3" /> 网上冲浪</label> </p> <p> <input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit2" value="全部重写"> </p></form></body></html>以上是html页<html><body><p>您好!<%request.form("textfield")response.write"<br>"if request("radiobutton")="男" then response.write"先生!"elseresponse.write"小姐!"end if response.write"欢迎您访问本站!"response.write"<br>"response.write"你的个人资料如下:"response.write"<br>"response.write"姓名:" request.form("textfield")response.write"<br>"response.write"性别:"request.form("radiobutton")response.write"<br>"response.write"爱好:"For i = 1 To request("checkbox").countresponse.write request("checkbox")(i)%></body></html>一上是asp页
1 回答
李晓健
TA贡献1036条经验 获得超461个赞
jsp中要导入相关的包的吧,就是最上面一堆相关的标签,不可以直接像html那样。
比如:
<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>
- 1 回答
- 0 关注
- 1171 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消