You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
2.2 KiB
PHTML
62 lines
2.2 KiB
PHTML
9 years ago
|
<div>
|
||
|
<div>火车票查询</div>
|
||
|
<div>
|
||
|
<form class="form-horizontal" role="form">
|
||
|
<div class="form-group">
|
||
|
<label class="col-sm-2 control-label" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;" id="">出发地:</label>
|
||
|
<div class="col-sm-4">
|
||
|
<input type="text" id="from" class="form-control" placeholder="如:桂林">
|
||
|
</div>
|
||
|
<label class="col-sm-2 control-label" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;">目的地:</label>
|
||
|
<div class="col-sm-4">
|
||
|
<input type="text" id="to" class="form-control" placeholder="如:桂林北">
|
||
|
</div>
|
||
|
<label for="inputEmail3" class="col-sm-2 control-label" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;">时间:</label>
|
||
|
<div class="col-sm-4">
|
||
|
<input type="text" id="date" class="form-control" placeholder="2016-09-05">
|
||
|
</div>
|
||
|
<button id="sub" type="button" class="btn btn-primary btn-sm">查询</button>
|
||
|
</div>
|
||
|
|
||
|
</form>
|
||
|
</div>
|
||
|
<div class="table-responsive" style="text-align: center;">
|
||
|
<table class="table table-bordered" id="back_table" style="">
|
||
|
|
||
|
|
||
|
</table>
|
||
|
<img id="loading" src="/bootstrap/img/loading.gif" style="display:none;margin:0 auto;" alt="">
|
||
|
</div>
|
||
|
</div>
|
||
|
<script>
|
||
|
var url='<?php echo site_url()."/apps/train/index/search";?>';
|
||
|
|
||
|
$("#sub").click(function(){
|
||
|
$("#loading").css("display","block");alert();
|
||
|
// $("#back_table").css("display","none");
|
||
|
$("#back_table").hide();
|
||
|
var from=$("#from").val();
|
||
|
var to=$("#to").val();
|
||
|
var date=$("#date").val();
|
||
|
$.post(url,
|
||
|
{
|
||
|
'from':from,
|
||
|
'to':to,
|
||
|
'date':date,
|
||
|
},
|
||
|
function(data){
|
||
|
$("#loading").css("display","none");
|
||
|
if(data.status===1){
|
||
|
// $("#back_table").css("display","block");
|
||
|
$("#back_table").show();
|
||
|
$("#back_table").html(data.backdata);
|
||
|
|
||
|
}else{
|
||
|
alert(data.mes);
|
||
|
}
|
||
|
|
||
|
},
|
||
|
'json');
|
||
|
});
|
||
|
|
||
|
</script>
|