<body>
<p>Tell Me About Yourself</p>
<br>
<form action="/action_page.php">
What is Your Name? <input type="text" name="name">
<br>
How old are you? <input type="text" name="old">
<br>
<p>What are your favorite subjects?</p>
<select name="subjects" size="3" multiple="multiple">
<option value="Math">Math</option>
<option value="Science">Science</option>
<option value="English">English</option>
<option value="History">History</option>
<option value="Art">Art</option>
<option value="Music">Music</option>
<option value="Social Studies">Social Studies</option>
<option value="Physics">Physics</option>
<option value="Chemistry">Chemistry</option>
<option value="Biology">Biology</option>
</select>
<form action=""method="get">
<p>Are you a boy ot a girl?</p>
<br>
<input type="radio"name="gender"value="girl"/>a girl
<input type="radio"name="gender"value="boy"/>a boy
<p>About My Web Site</p>
<form action=""method="get">
<p>What were your favorite pages?</p>
<input type="checkbox"name="page"value="home"/>Home
<input type="checkbox"name="page"value="about"/>About
<input type="checkbox"name="page"value="school"/>School
<input type="checkbox"name="page"value="hobbies"/>Hobbies
</p>
</form>
<form action=""mathod="get">
<p>please leave comment</p>
<textarea name="comments"/></textarea>
<p>
</form>
<input type="submit">
<input type="reset">
</body>
</html>
一个简单的调查问卷,望采纳
<%@ page language="java" contentType="text/html charset=UTF-8" pageEncoding="UTF-8"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<br/><br/><hr/>
<h1 align="center"><font color="#FF0000">问卷调查</font></h1>
<form action="">
<table width="60%" border="1" align="center" bgcolor="#CCCCCC" cellspacing="0">
<tr>
<td>姓名:</td>
<td><input type="text" /><font color="#FF0000">&nbsp必须填写</font></td>
</tr>
<tr>
<td>性别:</td>
<td><input type="radio" name=""/>男<input type="radio" name=""/>女</td>
</tr>
<tr>
<td>年龄:</td>
<td><input type="text" />岁</td>
</tr>
<tr>
<td>性格:</td>
<td>
<input type="checkbox" name="select1"/>乐天达观
<input type="checkbox" name="select2"/>成熟稳重
<input type="checkbox" name="select3"/>多愁善感
<input type="checkbox" name="select4"/>心地善良
<input type="checkbox" name="select5"/>实事求是
<input type="checkbox" name="select6"/>活泼可爱
<input type="checkbox" name="select7"/>聪明伶俐
</td>
</tr>
<tr>
<td>学历:</td>
<td>
<select name="">
<option value="" selected="selected">小学</option>
<option value="">初中</option>
<option value="">高中</option>
<option value="">大学</option>
<option value="">研究生</option>
<option value="">硕士研究生</option>
<option value="">博士</option>
</select>
</td>
</tr>
<tr>
<td>兴趣爱好:</td>
<td>
<select name="">
<option value="" selected="selected">体育</option>
<option value="">看书</option>
<option value="">玩游戏</option>
<option value="">逛街</option>
<option value="">健身</option>
<option value="">游泳</option>
<option value="">打球</option>
</select>
</td>
</tr>
<tr>
<td>有什么意见或建议:</td>
<td><textarea cols="80" rows="10"></textarea></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="提 交"/>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<input type="reset" value="重 置"/></td>
</tr>
</table>
</form>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8" />
<title>在线调查</title>
<script language="javascript">
function GetSelectedEffect(effects)
{
var i
for(i=0i<effects.lengthi++)
{
if(effects[i].checked) return effects[i].value
}
return"[没有选择]"
}
function GetSelectedPrograms(programs)
{
var i,result=""
for(i=0i<programs.lengthi++)
{
if(programs[i].checked) result+="["+programs[i].value+"]"
}
return result
}
function ShowResult()
{
var f,msg
f=document.myform
msg="您感觉本站:"+GetSelectedEffect(f.page_effect)
msg+="\n您希望本站出现以下栏目:"+GetSelectedPrograms(f.program)
alert(msg)
}
</script>
</head>
<body>
<table width="400">
<tr>
<td align="center">
<h2>在线调查</h2>
<p>您感觉本站的主页效果如何(单选):</p>
<form name="myform">
<p><input type="radio" value="非常好" name="page_effect" checked>非常好
<input type="radio" value="好" name="page_effect">好
<input type="radio" value="一般" name="page_effect" >一般
</p>
<p>您希望本站出现以下什么栏目(多选):</p>
<p><input type="checkbox" name="program" value="新闻">新闻
<input type="checkbox" name="program" value="娱乐">娱乐
<input type="checkbox" name="program" value="教育">教育
</p>
<p><input type="button" name="bl" value="提交" onClick="ShowResult()"></p>
</form>
</td></tr>
</table>
</body>
</html>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)