jquery easyui 的选项卡切换的问题

这个是jQuery easyui的一个demo问题

可以这样处理  吧导航标签的href改成way,也可以用其他的字母代替

<div id="mainPanle" region="center" style="background: #eee; overflow-y:hidden">
        <div id="tabs" class="easyui-tabs"  fit="true" border="false" >
            <div title="欢迎使用" style="padding:20px;overflow:hidden;" id="home">
                <a target="mainFrame" way="test1.html" >test1</a><br>
                <a target="mainFrame" way="test2.html" >test2</a><br />
                <a target="mainFrame" way="test3.html">test3</a>
            </div>
        </div>
    </div>

 

然后再把js  中的function InitLeftMenus() {
    /*alert("SDSFSDF");*/
    var n=$("#home").find("a");
    for(var h=0;h<n.length;h++){
        n.eq(h).click(function(){
            $(this).blur();/*元素失去焦点*/
            var tabTitle = $(this).text();/*获取左侧的内容*/
            /*alert(tabTitle);*/
            var url = $(this).attr("way");
            addTab(tabTitle,url);
        })
    }
}
 var url = $(this).attr("href");改成 var url = $(this).attr("way");

 

 

posted @ 2013-05-29 14:34  思思博士  阅读(414)  评论(0编辑  收藏  举报