<a href=”xxx” target=“ajax” [rel=“boxId”]>
示例:
<ahref="w_alert.html" target="ajax" rel="container">提示窗口</a>
<a href="user.do?method=remove"target="ajaxTodo">刪除</a>
或<a href="user.do?method=remove"target="ajaxTodo"title="確定要?jiǎng)h除嗎?">刪除</a>
Title為可選項(xiàng),如果設(shè)置,點(diǎn)擊后將調(diào)用alertMsg.confirm與用戶(hù)交互確認(rèn)或取消,Title值為提示信息.Target值為ajaxTodo時(shí)會(huì)自動(dòng)關(guān)聯(lián)如下JS。$("a[target=ajaxTodo]", $p).each(function(){
$(this).click(function(event){
var $this = $(this);
var title = $this.attr("title");
if (title) {
alertMsg.confirm(title, {
okCall: function(){
ajaxTodo($this.attr("href"));
}
});
} else {
ajaxTodo($this.attr("href"));
}
event.preventDefault();
});
});
<a href=”xxx” target=“dialog”[rel=“dialogId”]>
A所指向頁(yè)面將會(huì)在dialog 彈出層中打開(kāi),rel標(biāo)識(shí)此彈出層的ID,rel為可選項(xiàng)。<a href="w_dialog.html" target="dialog"rel="page2">彈出窗口</a>
或<a href="demo_page1.html"target="dialog" [max=true, mask=true, maxable=true,minable=true, resizable=true,drawable=true] rel="dlg_page1"title="[自定義標(biāo)題]" width="800" height="480">打開(kāi)窗口一</a>
Max 屬性表示此dialog打開(kāi)時(shí)默認(rèn)最大化, mask表示打開(kāi)層后將背景遮蓋. maxable: dialog 是否可最大化,$.pdialog.open(url, dlgId, title);
或$.pdialog.open(url, dlgId, title, options);
options:{width:100px,height:100px,max:true,mask:true,mixable:true,minable:true,resizable:true,drawable:true,fresh:true,close:”function”,param:”{msg:’message’}”}, 所有參數(shù)都是可選項(xiàng)。
關(guān)閉dialog層: $.pdialog.close(dialog); 參數(shù)dialog可以是彈出層jQuery對(duì)象或者是打開(kāi)dialog層時(shí)的dlgId.
或者$.pdialog.closeCurrent(); 關(guān)閉當(dāng)前活動(dòng)層。
$.pdialog.reload(url, {data:{}, dialogId:"",callback:null})
刷新dialogId指定的dialog,url:刷新時(shí)可重新指定加載數(shù)據(jù)的url, data:為加載數(shù)據(jù)時(shí)所需的參數(shù)。<a href=”xxx” target=“navTab”[rel=“tabId”]>
示例:<a href="url" target="navTab" >默認(rèn)頁(yè)面</a>
<a href="url" target="navTab" rel="page1" title="自定義標(biāo)簽名" fresh="false">自定義頁(yè)面</a>
<a href="url" target="navTab" external="true">iframe方式打開(kāi)</a>
target=navTab: 自動(dòng)關(guān)聯(lián)調(diào)用navTab組件external: 為external="true"或者h(yuǎn)ref是外網(wǎng)連接時(shí),以iframe方式打開(kāi)navTab頁(yè)面
navTab.openTab(tabid, url, { title:”New Tab”, fresh:false, data:{} });
其中data:{} json格式的數(shù)據(jù)
更多建議: