jquery easyui 中tab页添加其他页面,href与content的用法与区别

//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 
版权声明:本文为博主原创文章,转载请附上博文链接!

  

posted @ 2018-11-23 14:45  GordonDicaprio  阅读(1023)  评论(0编辑  收藏  举报