?? destine.jsp
字號:
<%@ 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}
.STYLE2 {font-size: 16px}
.STYLE3 {color: #FF0000}
.STYLE4 {color: #000000}
-->
</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 isNumber(id,div,label){
var s = document.getElementById(id).value;
var regu = "^[0-9]+$";
var re = new RegExp(regu);
if (s.search(re) != -1) {
document.getElementById(div).innerHTML="";
return true;
}
document.getElementById(div).innerHTML=label+"只能是數字";
return false;
}
function checkInsuranceNum(id,div,label){
var s = document.getElementById(id).value;
var b = true;
if(s.length!=0){
b = isNumber(id,div,label);
}
return b;
}
function checkPhone(id,div,label){
var b = false;
if(isEmpty(id,div,label)){
b = isNumber(id,div,label);
}
return b;
}
function checkPassengerNum(){
var adultNum = parseInt(document.getElementById("adultNum").value);
var childNum = parseInt(document.getElementById("childNum").value);
var babyNum = parseInt(document.getElementById("babyNum").value);
if(adultNum<childNum+babyNum){
document.getElementById("passengerNumDiv").innerHTML="每個成年人只能帶一個兒童或嬰兒";
return false;
}
document.getElementById("passengerNumDiv").innerHTML="";
return true;
}
function check(){
var bContactPerson = isEmpty("contactPerson","contactPersonDiv","聯系人姓名");
var bContactPhone = checkPhone('contactPhone','contactPoneDiv','聯系人電話');
var bInsuranceNum = checkInsuranceNum('insuranceNum','insuranceNumDiv','保險數量');
if(bContactPerson&&bInsuranceNum&&bContactPhone&&checkPassengerNum()){
return true;
}
return false;
}
</script>
</head>
<body>
<html:form action="/destineTicketAction.do?act=1" method="post" onsubmit="return check();">
<table width="934" height="95" border="1" align="center">
<tr>
<th height="31" colspan="11" scope="col"><div align="left" class="STYLE1">航程信息</div></th>
</tr>
<tr>
<td width="97" height="28"><div align="center">日期</div></td>
<td width="92"><div align="center">航空公司</div></td>
<td width="67"><div align="center">航班號</div></td>
<td width="80"><div align="center">起飛</div></td>
<td width="76"><div align="center">降落</div></td>
<td width="55"><div align="center">價格</div></td>
<td width="76"><div align="center">機建/燃油</div></td>
<td width="71"><div align="center">成人單價</div></td>
<td width="66"><div align="center">兒童單價</div></td>
<td width="65"><div align="center">嬰兒單價</div></td>
</tr>
<tr>
<td height="26"><bean:write name="fight" property="leaveDate"/> </td>
<td><bean:write name="fight" property="fightName"/> </td>
<td><bean:write name="fight" property="fightNo"/> </td>
<td><bean:write name="fight" property="leaveCity"/>\<bean:write name="fight" property="leaveTime"/> </td>
<td><bean:write name="fight" property="arriveCity"/>\<bean:write name="fight" property="arriveTime"/> </td>
<td>${0.9*fight.price } </td>
<td><bean:write name="fight" property="fuelRate"/>\<bean:write name="fight" property="buildRate"/> </td>
<td>${0.9*fight.price+fight.fuelRate+fight.buildRate } </td>
<td>${fight.price*0.8} </td>
<td>${fight.price*0.1} </td>
</tr>
</table>
<p> </p>
<table width="931" height="121" border="1" align="center">
<tr>
<th height="27" colspan="2" scope="col"><div align="left"><span class="STYLE2">登機人列表</span></div></th>
</tr>
<tr>
<td width="357" height="27">乘機人數:成人
<label>
<select name="adultNum" id="adultNum">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
兒童
<select name="childNum" id="childNum">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
嬰兒
<select name="babyNum" id="babyNum">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
</label></td>
<td width="558"><div id="passengerNumDiv" style="display:block;color:red"/> </td>
</tr>
<tr>
<td height="28" colspan="2">兒童價格為全價的50%,嬰兒價格為全價的10%!(兒童、嬰兒不需機場建設費!) </td>
</tr>
<tr>
<td height="17" colspan="2">每個成年人只能帶一個兒童或嬰兒!</td>
</tr>
</table>
<p> </p>
<table width="929" height="69" border="1" align="center">
<tr>
<th colspan="2" scope="col"><div align="left" class="STYLE2">購買保險</div></th>
</tr>
<tr>
<td width="515">單價:
<label>
<input type="text" name="insurancePrice" readonly value="20.0"/>
<span class="STYLE3">* <span class="STYLE4">保險數量:</span></span>
<input type="text" name="insuranceNum" id="insuranceNum" onBlur="checkInsuranceNum('insuranceNum','insuranceNumDiv','保險數量')"/>
</label>
</td>
<td width="398"><div id="insuranceNumDiv" style="display:block;color:red"/> </td>
</tr>
</table>
<p> </p>
<table width="926" height="123" border="1" align="center">
<tr>
<th colspan="2" scope="col"><div align="left"><span class="STYLE2">聯系人信息</span></div></th>
</tr>
<tr>
<td width="278">聯系人姓名:
<label>
<input type="text" name="contactPerson" id="contactPerson" onBlur="isEmpty('contactPerson','contactPersonDiv','聯系人姓名')"/>
<span class="STYLE3">* </span></label></td>
<td width="632" height="32"><div id="contactPersonDiv" style="display:block;color:red"/> </td>
</tr>
<tr>
<td>聯系人電話:
<input type="text" name="contactPhone" id="contactPhone" onBlur="checkPhone('contactPhone','contactPoneDiv','聯系人電話')"/>
<span class="STYLE3">*</span></td>
<td><div id="contactPoneDiv" style="display:block;color:red"/> </td>
</tr>
</table>
<p> </p>
<table width="926" height="140" border="1" align="center">
<tr>
<th scope="col"><div align="left" class="STYLE2">行程單配送方式</div></th>
</tr>
<tr>
<td><label>
<input type="radio" name="distributeStyle" value="不需要行程單" />
</label>
<label for="rdoTraffic0">不需要行程單</label>
(行程單僅作報銷憑證,不是登機的必要憑證)</td>
</tr>
<tr>
<td><label>
<input type="radio" name="distributeStyle" value="送票上門" />
送票上門(僅限深圳地區)</label></td>
</tr>
<tr>
<td><label>
<input type="radio" name="distributeStyle" value="快遞或平郵 " />
快遞或平郵
</label></td>
</tr>
<tr>
<td><label>
<input type="radio" name="distributeStyle" value="門市自取" checked/>
</label>
<label for="rdoTraffic3">門市自取</label> <label>
<html:select property="takeSelfAddress">
<logic:present name="addresss">
<logic:iterate id="address" name="addresss">
<html:option value="${address.city}${address.address}">${address.city}${address.address}</html:option>
</logic:iterate>
</logic:present>
</html:select>
</label></td>
</tr>
</table>
<p> </p>
<table width="928" height="63" border="1" align="center">
<tr>
<th scope="col"><div align="left" class="STYLE2">支付方式</div></th>
</tr>
<tr>
<td><label>
<input type="radio" name="payStyle" value=" 在線支付" checked/>
在線支付(支持易寶支付和銀聯手機支付)
<input type="radio" name="payStyle" value="票到付款" />
票到付款(僅限深圳,異地需加10元快遞費)
<input type="radio" name="payStyle" value="銀行轉帳" />
銀行轉帳</label></td>
</tr>
<tr><td><html:hidden property="fightId" value="${fight.fightId}"></html:hidden></td></tr>
</table>
<p>
<div align="center">
<input type="submit" name="Submit" value="下一步" />
</div>
</p>
</html:form>
</body>
</html:html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -