Default.aspx
上传用户:zhl0745
上传日期:2022-04-11
资源大小:128k
文件大小:3k
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title>火车票查询</title>
- <style type="text/css">
- body
- {
- text-align: center;
- }
- .button
- {
- margin: 0px;
- padding: 0px;
- border: 0px;
- width: 59px;
- height: 17px;
- background-image: url( "images/BtnQuery.gif" );
- }
- .text
- {
- border:1px #6CF solid;
- }
- hr
- {
- color:#cccccc;
- width: 200px;
- }
- .divContainer
- {
- border:2px #cccccc solid;
- width: 200px;
- text-align: left;
- }
- </style>
- <script type="text/javascript" language="javascript" src="jquery-1.3.2-vsdoc2.js"></script>
- <!-- 51aspx -->
- <script type="text/javascript" language="javascript">
- //5-1-a-s-p-x
- $(document).ready(function(){
- $("#btnOK").click(setResult);
- });
- function setResult(){
- var no = $("#txtNo").val();
- var start = $("#txtStart").val();
- var end = $("#txtEnd").val();
- var type = $("#slTicketType").val();
- $.post("/MyTicketSaleWeb/WebService.asmx/GetResult",{"num":no,"start":start,"end":end,"type":type},function(doc){
- $(doc).find("TicketModel ").each(function(){
- var count = $(this).find("TicketCount").text();
- if(count == "0" || count == ""){
- $("#spTickctCount").text("没有可销售的票");
- return;
- }
- $("#spTickctCount").text(count);
- $("#spUnitPrice").text($(this).find("UnitPrice").text());
- $("#spStartTime").text($(this).find("StartTime").text());
- });
- });
- }
- </script>
- </head>
- <body>
- <form id="form1" runat="server">
- <div class="divContainer">
- 输入车次:<br />
- <input id="txtNo" class="text"/>
- <br />
- 出发地:<br />
- <input id="txtStart" class="text"/><br />
- 到达地:<br />
- <input id="txtEnd" class="text"/><br />
- 票类型:<br />
- <select id="slTicketType" class="text">
- <option value="1">硬座</option>
- <option value="2">硬卧</option>
- <option value="3">软卧</option>
- </select><br />
- 供学习用,非模糊查询<br />
- <input type="button" id="btnOK" class="button" />
- <br />
- <hr />
- 剩余票数:<span id="spTickctCount"></span>
- <br />
- <br />
- 票 单 价:<span id="spUnitPrice"></span>
- <br />
- <br />
- 发车时间:<span id="spStartTime"></span>
- </div>
- </form>
- </body>
- </html>