作者:zccst
基本用法(来自手册)
[b]使用场景一:在A文件通过dialog嵌入B文件[/b]
第一步:在A文件
第二步:在B文件,即name.php
接收A文件传递过来的参数,
[b]使用场景二:在YII中使用[/b]
1,前端
2,后端
基本用法(来自手册)
//用法一
$("#feeds").load("feeds.html");
//用法二
$("#feeds").load("feeds.php", {limit: 25}, function(){
alert("The last 25 entries in the feed have been loaded");
});
[b]使用场景一:在A文件通过dialog嵌入B文件[/b]
第一步:在A文件
var url = "path/to/name.php?id=2345";
var div = $(".device_dialog").length == 0 ? $("<div class='device_dialog'></div>").appendTo("div.create"):$(".device_dialog");
div.load(url).dialog({
})
第二步:在B文件,即name.php
接收A文件传递过来的参数,
echo $_GET['id'];
[b]使用场景二:在YII中使用[/b]
1,前端
var div = $(".haha");
$("body").showLoading();
div.load("?module/controllerID/actionID",{key:value},function(r){
$("body").hideLoading();
$(this).dialog({});
},'json');
2,后端
public function actionUserDoing() {
$uid = $this->request->getParam("user_id");
$this->render('user_doing', array('uid ' => $uid ));
}