Jquery easyui中tabs新建标签设置href会提交两次请求

Jquery easyui 1.2.4中tabs新建标签设置href会提交两次请求,这个问题应该说是个挺严重的bug,换用1.2.3版本就没有这个问题。猜想easyui是修改了panel的加载机制或缓存机制吧,总之在options中添加closed: true这个属性就可以解决这个问题。不过觉得有点奇怪的感觉。如下示例:<div id="tt" class="easyui-tabs" style="width:500px;height:250px;">    <div title="Tab1" style="padding:20px;display:none;">        tab1     </div>    <div title="Tab2" closable="true" style="overflow:auto;padding:20px;display:none;">        tab2     </div>    <div title="Tab3" iconCls="icon-reload" closable="true" style="padding:20px;display:none;">        tab3     </div></div><a id="aa" class="easyui-linkbutton">aaa</a><script type="text/javascript">    $(function(){        $('#tt').tabs({            border: false,            onSelect: function(title){                //alert(title + ' is selected');            }        });                $("#aa").click(function(){            $('#tt').tabs('add', {                title: 'New Tab',                href: '/test.html',                closable: true,                closed: true            });        });    });

</script>

转载于:https://my.oschina.net/iqlyitfom/blog/51515

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值