<!DOCTYPE html> <html> <head> <!--<meta charset="utf-8">--> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="js/jquery.mobile-1.4.5.css"> </head> <body> <!--航班查询--> <div data-role="page" id="index"> <div data-role="header" data-theme="b"> <h1>航班时刻表查询</h1> </div> <div role="main" data-role="ui-content"> <a href="#" id="ajaxbtn" class="ui-btn" >点我加载</a> </div> <div data-role="navbar" data-theme="b"> <ul> <li><a href="#index" data-icon="search" data-theme="b">航班查询</a></li> <li><a href="#index2" data-icon="search" data-theme="b">火车时刻表</a></li> <li><a href="#" data-icon="search" data-theme="b">天气查询</a></li> </ul> </div> </div> <script src="http://keleyi.com/keleyi/pmedia/jquery/jquery-1.11.1.js"></script> <script src="js/jquery.mobile-1.4.5.js"></script> <script> $(document).on("pageinit","#index",function(){ var url="http://www.corsproxy.com/webservice.webxml.com.cn/WebServices/TrainTimeWebService.asmx/getStationAndTimeByStationName&UserID=";//通过发车站和到达站查询火车时刻表 $("ajaxbtn").on("click",function(){ $.grt(url,{TrainCode:"G1"},function(data){ console.log(data); }); }); }); </script> </body> </html>
小太爷_0001
2014-11-06
1 回答
举报
0/150
提交
取消