ordertrack.jsp

来自「主要是航空预订系统」· JSP 代码 · 共 74 行

JSP
74
字号
<%@ page language="java" contentType="text/html; charset=gbk"
    pageEncoding="gbk"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html:html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<title>Insert title here</title>
<style type="text/css">
<!--
.STYLE1 {
	font-size: 18px;
	font-weight: bold;
}
-->
</style>
<script type="text/javascript" language="javascript">
function isEmpty(id,div,label){
	var eid = document.getElementById(id);
	if(eid.value.length==0){
		document.getElementById(div).innerHTML=label+"不能为空";
		return false;
	}
	document.getElementById(div).innerHTML="";
	return true;
}
function onSubmitCheck(){
	var bContactPerson = isEmpty('contactPerson','contactPersonDiv','联系人');
	var bContactPhone = isEmpty('contactPerson','contactPhoneDiv','联系电话');
	if(bContactPerson&&bContactPhone){
		return true;
	}
	return false;
}
</script>
</head>

<body>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<html:form action="/orderTrackAction.do" method="post" onsubmit="return onSubmitCheck();">
<table width="744" height="140" border="1" align="center">
  <tr>
    <th colspan="3" scope="col"><span class="STYLE1">订单跟踪</span></th>
  </tr>
  <tr>
    <td>联系人:</td>
    <td><label>
      <input type="text" name="contactPerson" id="contactPerson" onblur="isEmpty('contactPerson','contactPersonDiv','联系人')"/>
    </label></td>
    <td><div id="contactPersonDiv" style="display:block;color:red"></div>&nbsp;</td>
  </tr>
  <tr>
    <td height="27">联系电话:</td>
    <td><label>
      <input type="text" name="contactPhone" id="contactPhone" onblur="isEmpty('contactPhone','contactPhoneDiv','联系电话')"/>
    </label></td>
    <td><div id="contactPhoneDiv" style="display:block;color:red"></div>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3"><label></label>
      <label></label>
    
      <div align="left">
        <input type="submit" name="Submit" value="订单查询" />
    </div></td>
  </tr>
</table>
</html:form>
</body>
</html:html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?