首先介绍get()函数:
url,[data],[callback],[type]
参数说明:
url:待载入页面的URL地址
data:待发送 Key/value 参数。
callback:载入成功时回调函数。
type:返回内容格式,xml, html, script, json, text, _default。
首先建立testGet.php实例:
<?php $web = $_GET['webname']; echo "你现在访问的网站是:".$web; ?>
然见建立ajax.html文件:
测试前的初始页面是:
点击测试后的结果是:
Copyright 2014-2023 //m.sbmmt.com/ All Rights Reserved | 苏州跃动光标网络科技有限公司 | 苏ICP备2020058653号-1
| 本站CDN由 数掘科技 提供