htmlä¸è·åæ ç¾çæ°æ®ï¼å¯ä»¥éè¿jsæ¥è·åï¼å¦ä¸ä»£ç ï¼
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
function validate(){//ä¸ ï¼æ¯éè¿jDOM
// var attitudeObj = document.getElementById("attitude");
//var attitude = attitudeObj.innerHTML;//äº ï¼æ¯éè¿jquery
var att = $("#attitude").text();//å¯ä»¥å¾å°è¾å ¥åä¸çå 容
var idnum = $("#idnum").val();
var name = $("#name").val();
var t_name = $("#t_name").val() ;
var pro_name = $("#pro_name").val() ;
// alert(att);
if( name == null || name == "" ){
alert("请è¾å ¥æ¯ä¸è®¾è®¡å称!");
return false;
}
att = att.replace(/\s+/g,"");
if( att == null || att == ""){
alert("请è¾å ¥éé¢é¡»ç¥ï¼");
return false;
}
if( t_name == null || t_name == "" ){
alert("请éæ©æå¸!");
return false;
}
if( pro_name == null || pro_name == ""){
alert("请éæ©ä¸ä¸ï¼");
return false;
}
location="teacher/mainfra.jsp";
//location="teacherAction_AddGraduationTitle.action?idnum=" + idnum +"&cname=" + cname +"&start=" + start+"&end=" + end;
return true;
}
</script>
</head>
<body">
<div >
<div style="margin-left: 100px;">
<!-- <form action="teacherAction_AddGraduationTitle.action" method="post" >-->
<span>èªå¨ç¼å·ï¼</span><input type="text" readonly="readonly" name="idnum" id="idnum" style="background: gray;" value="<s:property value="#request.maxIdnum"/>"/><br/>
<br/>
<span>æ¯ä¸è®¾è®¡å称ï¼</span><input type="text" name="name" id="name"/><br/><br/>
<span>æå±æå¸ï¼</span><select name="t_name" id="t_name">
<option></option>
<s:iterator value="teacherList">
<option value="<s:property value='idnum' />"><s:property value="name" /></option>
</s:iterator>
</select> <br/> <br/>
<span>æå±ä¸ä¸ï¼</span><select name="pro_name" id="pro_name">
<option></option>
<s:iterator value="professionList">
<option value="<s:property value='idnum' />"><s:property value="pro_name" /></option>
</s:iterator>
</select>
<br/>
<br/>
<span>éé¢é¡»ç¥ï¼</span>
<textarea id ="attitude" name="attitude" rows="3" cols="30" style="color: red;">
</textarea>
<br/>
<br/>
<input type="button" value="æ·»å "> <input style="margin-left: 100px" type="reset" value="éç½®">
<!-- </form> -->
</div>
</div>
</body>