} seclist.add(sec[sec.length-1].substring(0,sec[sec.length-1].length()-1)); } %> classlist[<%= i+1 %>] = new Array( new Option( '<%= seclist.get(0)%>','<%= i+1 %>')<% for(int j=1;j<seclist.size();j++){ %> , new Option( '<%= seclist.get(j)%>','<%= i+1%>')<% }%>); <%}%>
function s(sid){ if (sid==""){ document.Nett.s2.length=0; document.Nett.s2.add(new Option("-不选-","")); } else{ document.Nett.s2.length=0; if (classlist[sid].length>0){
<html:html>
<head>
<title>
无标题文档
</title>
<%
String[] FirstDeptName = (String[])request.getAttribute("FirstDeptName");
String[] secondept = (String[])request.getAttribute("secondept");
%>
<script language="javascript" type="text/javascript">
function checkForm1(){
if(document.Nett.title.value.length <= 0){
alert("请输入标题名称!!");
return false;
}
if(document.Nett.age.value.length <= 0){
alert("请输入年龄!!");
return false;
}
if(document.Nett.IllHistory.value.length <= 0){
alert("请输入病史!!");
return false;
}
if(document.Nett.AskAim.value.length <= 0){
alert("请输入目的!!");
return false;
}
if(document.Nett.SecondDeptTyep.value.length <= 0 ){
alert("请选择所属科室!!");
return false;
}
return true;
}
var classlist = [];
<% for(int i=0;i<FirstDeptName.length;i++) {
String[] sec = secondept[i].split(",");
List seclist = new ArrayList();
seclist.add(sec[0].substring(1,sec[0].length()));
if(sec.length>1){
for(int j=1;j<sec.length-1;j++){
seclist.add(sec[j]);
}
seclist.add(sec[sec.length-1].substring(0,sec[sec.length-1].length()-1));
}
%>
classlist[<%= i+1 %>] = new Array( new Option( '<%= seclist.get(0)%>','<%= i+1 %>')<% for(int j=1;j<seclist.size();j++){ %> , new Option( '<%= seclist.get(j)%>','<%= i+1%>')<% }%>);
<%}%>
function s(sid){
if (sid==""){
document.Nett.s2.length=0;
document.Nett.s2.add(new Option("-不选-",""));
}
else{
document.Nett.s2.length=0;
if (classlist[sid].length>0){
document.Nett.s2.add(new Option("-选择-","")); for (var i=0;i<classlist[sid].length;i++){
document.Nett.s2.add(classlist[sid][i]);
}
}
}
}
</script><link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #EFEBEF;
}
.STYLE3 {color: #9C0000}
-->
</style></head>
<body>
<form action="Asksuccess.do" method="post" enctype="multipart/form-data" name="Nett" onsubmit="checkForm1();">
<table width="505" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="198" rowspan="3"><img id="tw_03" src="../leave_ word/img/tw_03.gif" width="198" height="68" alt="" /></td>
<td height="26" colspan="2"> </td>
</tr>
<tr>
<td width="320" height="27" bgcolor="#E5F7D3"> </td>
<td width="14" height="27" valign="bottom"><img id="tw_07" src="../leave_ word/img/tw_07.gif" width="14" height="27" alt="" /></td>
</tr>
<tr>
<td colspan="2" align="right" valign="bottom" bgcolor="#4EC211"><span class="STYLE3"><font color="#FFFFFF">本站专家将在二十四小时内及时给予回复!</font></span></td>
</tr>
<tr bgcolor="#E5F7D3">
<td height="479" colspan="3" valign="top"><br /> <br />
<table width="483" border="0" align="center" cellpadding="0" cellspacing="1">
<tr align="center">
<td height="25" colspan="6">带<font color="#FF0000">*</font>号均属必填内容,请尽量详细填写你的提问信息!</td>
</tr>
<tr>
<td width="78" height="25"><strong>问题标题:</strong></td>
<td height="25" colspan="5"><input name="title" size="30"/>
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td height="26"><strong>患者性别:</strong><br /></td>
<td width="91" height="26">
<select name="sex">
<option selected="selected">男</option>
<option>女</option>
</select> <font color="#FF0000">*</font></td>
<td width="41" height="26"><strong>年龄:<br />
</strong></td>
<td width="108" height="26">
<input name="age" type="text" size="3" maxlength="3" />
岁<font color="#FF0000">*</font></td>
<td width="44"> </td>
<td width="114"> </td>
</tr>
<tr>
<td height="100"><strong>以往诊断治疗经过(病史):</strong><br /></td>
<td height="120" colspan="5"> <textarea name="IllHistory" cols="52" rows="7"></textarea>
<font color="#FF0000">*</font> </td>
</tr>
<tr>
<td height="100"><strong>目前病情及咨询目的:</strong></td>
<td height="120" colspan="5"> <textarea name="AskAim" cols="52" rows="7"></textarea>
<font color="#FF0000">*</font> </td>
</tr>
<tr>
<td height="68"><strong>所属类别:</strong></td>
<td height="68" colspan="5"> <table width="362" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="158" height="22">所属大类:</td>
<td width="204">所属小类:</td>
</tr>
<tr>
<td height="27"> <select id=select style="WIDTH: 100px" onchange=s(this.value); name=s1>
<%
for(int i=0;i<FirstDeptName.length;i++){
%>
<option selected><%= FirstDeptName[i] %></option>
<% } %>
</select>
</td>
<td><select id=select2 name=s2>
</select> <font color="#FF0000">*</font></td>
</tr>
</table></td>
</tr>
<tr>
<td height="25"><strong>相关图片:</strong></td>
<td height="25" colspan="5">
<input name=file type=file style="width:360" value="" />
图片大小限制(500K)
</td>
</tr>
<tr>
<td height="38" colspan="6" align="center" valign="bottom">
<INPUT type="hidden" name="AskEim" value="" /> <input type="image" src="../leave_ word/img/tj.gif" width="57" height="20" onclick="return checkForm1();" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3"><img id="tw_10" src="../leave_ word/img/tw_10.gif" width="532" height="18" alt="" /></td>
</tr>
</table>
</form>
</td>
</tr>
</table><table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img id="sy_53" src="../leave_ word/img/sy_53.gif" width="778" height="84" alt="" /></td>
</tr>
</table>
</body>
</html:html>
真让人着急,我要被炒鱿鱼了!!!!!!!!!!!!!!!!!!!!!!!!!!!!
帮帮忙忙吧!!!!!!!!!
在下感激不尽!!!!!!!!!!
噢,对了,上面上传的代码有一点点删减,但是不碍大家观看效果