Home > php教程 > php手册 > 简单系列:无刷新的快递查询

简单系列:无刷新的快递查询

WBOY
Release: 2016-06-07 11:38:50
Original
1679 people have browsed it

基于jiayouzl 的PHP快递单号跟踪类开发 的用法实例 自己添加了无刷新
供新手参考 大神勿喷!小弟谢过!
http://www.thinkphp.cn/extend/587.html
简单系列:无刷新的快递查询
主要代码public function getExpress(){<br>         $num = I("num");<br>         $express = new \Org\Util\Express();<br>         $info = $express -> getorder($num);<br>         //dump($info);<br>         $nu = $info['nu'];<br>         $state = $info['state'];<br>         $data = $info['data'];<br>         $this->assign('nu',$nu);<br>         $this->assign('state',$state);<br>         $this->assign('data',$data);<br>         $this->display();<br>     }ajax代码<script><br /> $(document).ready(function () {<br /> $("#form").submit(function(event){<br /> event.preventDefault();<br /> var $form = $(this),<br /> num = $form.find(&#039;input[name = "num"]&#039;).val(),<br /> url = $form.attr("action");<br /> $("#result").html("载入中。。。");<br /> $.post(url,{num:num},function(data){<br /> $("#result").empty().append(data);<br /> })<br /> <br /> });<br /> })<br /> </script>

附件 express+ajax.zip ( 1.07 MB 下载:166 次 )

AD:真正免费,域名+虚机+企业邮箱=0元

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template