注册 登录
编程论坛 jQuery论坛

easyui tabs嵌套页面

国际新生 发布于 2016-11-30 21:33, 3346 次点击
只有本站会员才能查看附件,请 登录

下面是代码:

程序代码:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学生请假管理系统</title>
    <!--jquery-->
    <script src="jquery-easyui/jquery.min.js"></script>
    <!--/jquery-->
    <!--easyUI-->

    <link href="jquery-easyui/themes/icon.css" rel="stylesheet" type="text/css">
    <link href="jquery-easyui/themes/default/easyui.css" rel="stylesheet" type="text/css">

    <script src="jquery-easyui/jquery.easyui.min.js"></script>
    <script src="jquery-easyui/locale/easyui-lang-zh_CN.js"></script>

    <!--/easyUI-->

</head>
<body class="easyui-layout">
    <div region="north" style =" height: 80px;background-color : #00bbee">
        <div style="float:left">
            <img src="#">logo
            <p style="color: #7a43b6;font-size: 25px;margin-left: 20px;">学生请假管理系统</p>
        </div>
    </div>
    <div region="center" style="width: auto">
        <div class="easyui-tabs" fit="true" border="false" id="tabs">
            <div title="首页">
                <!--首页  内容  待定-->
            </div>
        </div>
    </div>
    <div region="west" style="height: 200px;width:250px" title="菜单导航" split="true">
        <div class="easyui-accordion" data-options="fit:true,border:false">
            <div title="基础数据管理">
                <ul>
                    <li><a href="inline/user_management.html" class="easyui-linkbutton"
                           data-options="plain:true" onclick="addPanel(text)" text="用户管理">用户管理</a>
                    </li>
                    <li><a href="inline/role_management.html" class="easyui-linkbutton"
                           data-options="plain:true" onclick="addPanel(text)" text="角色管理">角色管理</a>
                    </li>
                    <li><a href="inline/user_right_management.html" class="easyui-linkbutton"
                           data-options="plain:true" onclick="addPanel(text)" text="用户权限管理">用户权限管理</a>
                    </li>
                </ul>
            </div>
            <div title="流程管理">
                <ul>
                    <li><a href="javascript:void(0);" class="easyui-linkbutton"
                           data-options="plain:true" onclick="addPanel(text)" text="流程部署管理">流程部署管理</a>
                    </li>
                    <li><a href="javascript:void(0);" class="easyui-linkbutton"
                           data-options="plain:true" onclick="addPanel(text)" text="流程定义管理">流程定义管理</a>
                    </li>

                </ul>
            </div>
            <div title="任务管理">
                <ul>
                    <li><a href="javascipt:void(0);" class="easyui-linkbutton"
                           data-options="plain:true" onclick="addPanel(text)" text="待办任务">待办任务</a>
                    </li>
                    <li><a href="javascipt:void(0);" class="easyui-linkbutton"
                           data-options="plain:true" onclick="addPanel(text)" text="已办任务">已办任务</a>
                    </li>
                    <li><a href="javascipt:void(0);" class="easyui-linkbutton"
                           data-options="plain:true" onclick="addPanel(text)" text="历史任务">历史任务</a>
                    </li>
                    <!--学生请假-->
                    <li><a href="javascipt:void(0);" class="easyui-linkbutton" url="ask_leave.html"
                           data-options="plain:true" onclick="addPanel(text,url)" text="请假申请">请假申请</a>
                    </li>
                </ul>
            </div>
            <div title="系统管理">
                <ul>
                    <!--<li><a href="javascript:void(0);" class="easyui-linkbutton"-->
                           <!--data-options="plain:true" onclick="addPanel(text)" text="修改密码">修改密码</a>-->
                    <!--</li>-->
                    <li><a href="login.html" style="text-decoration: none;display: inline-block;vertical-align: top;
                             font-size: 12px;color: black;">退出系统</a>
                    </li>
                </ul>
            </div>
        </div>

    </div>
    <div region="south" style="height: 25px;" align="center">
        嘉应学院
    </div>
<script>

    function addPanel(text,url) {
        if($("#tabs").tabs('exists',text)){
            $("#tabs").tabs('select',text);
        }else{
            var content="<iframe src='+url+' frameborder='0' scrolling='auto' style='width:100%;height:100%'>"
            $('#tabs').tabs('add',{

                title:text,
                content:content,
                closable:true

            });

        }

    }
</script>
</body>
</html>

有哪里写错了吗
2 回复
#2
国际新生2016-11-30 21:35
我这里需要动态添加页面,可是 请假申请 那里点了没反应
#3
逐心者2016-12-10 12:12
小白一枚,学习一下。
1