jquery easyui 中tab頁新增其他頁面,href與content的用法與區別
阿新 • • 發佈:2018-11-23
//tab頁增加 function addPanel(name,url){ var dd = $('#tt').tabs('exists',name); if(dd){ $('#tt').tabs('select',name); }else{ var content = '<iframe scrolling="auto" frameborder="0" src="'+url+'" style="width:100%;height:100%;"></iframe>'; $('#tt').tabs('add',{ id: name, title: name, //href:'./'+pageName, //使用href是用過ajax請求方式,將請求頁面內容載入到本頁面中。 缺點:js引入不好控制 content:content, //使用content的iframe方式:將整個頁面嵌入到tab頁內。 缺點:js重複載入 closable: true }); } } --------------------- 作者:selaginella 來源:CSDN 原文:https://blog.csdn.net/selaginella/article/details/42738209 版權宣告:本文為博主原創文章,轉載請附上博文連結!