script标签, 即 html中的 js脚本区域中:
}else{
tt.tabs('add',{
title:tit+' {$curClass}', // 使用 tp变量输出
href:"{:U('pjcontent')}", // 使用 tp的输出函数
closable:true,
cache: true,
});
title: ‘<span class="glyphicon glyphicon-edit"></span>‘ + tit , // 使用 span图标
比如: href: ‘这个是一个 远程的ajax 的 内容页面的 字符串!!! ‘ , 必须是字符串, 所以 必须 加 引号.
而且 这个内容页面 必须是 完整的 url地址, 即使 该内容 页面 的相对地址 跟 当前页面的 相对地址 是 在 同一个位置, 你也不能写成 href: ‘./content.html‘的方式,
否则, 就会 一直 显示 loading... 的 ajax 加载过程
即 这个地址 必须 用" {:U(‘content‘)}" 的 U 方法来写, 或者是 直接写出整个 完整的 地址: "/index.php/Home/Index/content.html" 来也是可以的!!
$('ul#jslist>li').click(function(){
var tit=this.innerHTML;
if(tt.tabs('exists', tit)){
tt.tabs('select', tit);
}else{
tt.tabs('add',{
title:tit,
href:"/index.php/Home/Index/content.html",
closable:true,
cache: true,
});
}
});
关于html中的 script标签中的 代码写法有效性? easyui tabs的href不能载入内容页面
原文:https://www.cnblogs.com/bkylee/p/10747401.html