<!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
提交
取消
2014-11-06
為什么沒有按鈕加載事件?。坷蠋焸€前輩指點下啊