<title></title>
<script>
var array=new Array();
function change(subname){
count=subname.selectedIndex;
array[count]=subname.options[count].value;
}
function chk(subname){
subname.textarea.value=array[count];
for(var i=0;i<subname.profession.length;i++){
if(subname.profession[i].checked)
subname.textarea.value=subname.textarea.value+"所选专业及课程名:\n"+" "+subname.profession[i].value+"\n";
}
for (var i=0; i<subname.subject.length;i++){
if (subname.subject[i].checked){
subname.textarea.value=subname.textarea.value+" "+subname.subject[i].value+"\n";
}
}
}
function clr(subname){
subname.textarea.value="";
subname.profession[0].checked=true;
for (i=0; i<subname.subject.length; i++){
subname.subject[i].checked=false;
}
}
</script>
</head>
<body>
<form method="post" name="form1" id="form1">
<p>专业</p>
<p>
<input name="profession" type="radio" id="RadioGroup1_0" value="计算机信息管理" checked="checked"/>计算机信息管理
<br>
<input name="profession" type="radio" id="RadioGroup1_1" value="计算机应用技术" />计算机应用技术
</p>
<p>年级</p>
<p>
<select name="grade" id="grade" onChange="change(this)">
<option>请选择</option>
<option value="2011级">2011级</option>
<option value="2012级">2012级</option>
<option value="2013级">2013级</option>
<option value="2014级">2014级</option>
<option value="2015级">2015级</option>
</select>
</p>
<p>可选课程</p>
<p>
<input name="subject" type="checkbox" id="CheckboxGroup1_0" value="嵌入式面向对象编程规范" />嵌入式面向对象编程规范
<br>
<input name="subject" type="checkbox" id="CheckboxGroup1_1" value="网页制作" />网页制作
<br>
<input name="subject" type="checkbox" id="CheckboxGroup1_2" value="脚本语言与动态网页设计" />脚本语言与动态网页设计
<br>
<input name="subject" type="checkbox" id="CheckboxGroup1_3" value="信息系统设计与实施" />信息系统设计与实施
<br>
<input name="subject" type="checkbox" id="CheckboxGroup1_4" value="JSP商务网页设计" />JSP商务网页设计
<br>
</p>
<p>
<input name="button" type="button" id="button" onclick="chk(this.form)" value="确定" />
<input name="button2" type="button" id="button2" onclick="clr(this.form)" value="重选" />
</p>
<p>选课情况</p>
<p>
<textarea name="textarea" type="text" cols="50" rows="5" id="textarea" /></textarea>
</p>
</form>
</body>
</html>
专业、年级和选课情况应该在文本框提交后显示,然而它却不显示?
super_mb
相关分类