关注JEECG发展历程 关注最新动态和版本, 记录JEECG成长点滴 更新日志 - 技术支持 - 招聘英才

JEECG最新版本下载 JEECG智能开发平台 - 显著提高开发效率 常见问题 - 入门视频 - 参与开源团队

商务QQ: 69893005、3102411850 商务热线(5*8小时): 010-64808099 官方邮箱: jeecgos@163.com

查看: 8010|回复: 3

[UI标签] jsp页面上如何以超链接的形式打开一个新增的tab页

[复制链接]
发表于 2016-5-31 16:57:33 | 显示全部楼层 |阅读模式
本帖最后由 yangchaomiao 于 2016-6-1 08:56 编辑

首页上给图片加超链接怎么使打开后的是新增一个tab页面,而不是覆盖首页,试了下addonetab方法不行啊。
<a href="#"><img src="images/Create---Write.png">车辆申请</div></a>
function addOneTab(subtitle, url, icon) {
        alert("哈哈哈");
        var subtitle="车辆申请";
        var url='carController.do?list';
        var indexStyle = getCookie("JEECGINDEXSTYLE");
        if(indexStyle=='sliding'||indexStyle=='bootstrap'){
                window.location.href=url;
        }else if(indexStyle=='acele'||indexStyle=='ace'){

 楼主| 发表于 2016-5-31 16:57:57 | 显示全部楼层
续上var id = "";
                //if(url.indexOf("=")!=-1){
                //        id = url.substring(url.indexOf("=")+1);
                //}else{
                        id = createTabId(subtitle);
                //}
                window.top.addTabs({id:id,title:subtitle,close: true,url: url});
        }else{
                if (icon == '') {
                        icon = 'icon folder';
                }
                window.top.$.messager.progress({
                        text : '页面加载中....',
                        interval : 300
                });
                window.top.$('#maintabs').tabs({
                        onClose : function(subtitle, index) {
                                window.top.$.messager.progress('close');
                        }
                });
                if (window.top.$('#maintabs').tabs('exists', subtitle)) {
                        window.top.$('#maintabs').tabs('select', subtitle);
                        if (url.indexOf('isHref') != -1) {
                                window.top.$('#maintabs').tabs('update', {
                                        tab : window.top.$('#maintabs').tabs('getSelected'),
                                        options : {
                                                title : subtitle,
                                                href:url,
                                                //content : '<iframe src="' + url + '" frameborder="0" style="border:0;width:100%;height:99.4%;"></iframe>',
                                                closable : true,
                                                icon : icon
                                        }
                                });
                        }else {
                                window.top.$('#maintabs').tabs('update', {
                                        tab : window.top.$('#maintabs').tabs('getSelected'),
                                        options : {
                                                title : subtitle,
                                                content : '<iframe src="' + url + '" frameborder="0" style="border:0;width:100%;height:99.4%;"></iframe>',
                                                //content : '<iframe src="' + url + '" frameborder="0" style="border:0;width:100%;height:99.4%;"></iframe>',
                                                closable : true,
                                                icon : icon
                                        }
                                });
                        }
                } else {
                        if (url.indexOf('isHref') != -1) {
                                window.top.$('#maintabs').tabs('add', {
                                        title : subtitle,
                                        href:url,
                                        closable : true,
                                        icon : icon
                                });
                        }else {
                                window.top.$('#maintabs').tabs('add', {
                                        title : subtitle,
                                        content : '<iframe src="' + url + '" frameborder="0" style="border:0;width:100%;height:99.4%;"></iframe>',
                                        closable : true,
                                        icon : icon
                                });
                        }
                }
        }
}
 楼主| 发表于 2016-6-1 08:54:23 | 显示全部楼层
怎么做啊??
发表于 2018-1-2 18:39:55 | 显示全部楼层
大佬,你这个问题解决了不,我也碰到这个了,,
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表