为了账号安全,请及时绑定邮箱和手机立即绑定

dwz入门

标签:
Html/CSS
  1. 首先引入dwz的样式库

<link href="<%=basePath%>themes/default/style.css" rel="stylesheet"

type="text/css" media="screen" />

<link href="<%=basePath%>themes/css/core.css" rel="stylesheet"

type="text/css" media="screen" />

<link href="<%=basePath%>themes/css/print.css" rel="stylesheet"

type="text/css" media="print" />

<link href="<%=basePath%>themes/css/ieHack.css" rel="stylesheet"

type="text/css" media="screen" />

2.引入必要的js库

<script class="lazyload" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" data-original="<%=basePath%>scripts/speedup.js" type="text/javascript"></script>

<script class="lazyload" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" data-original="<%=basePath%>scripts/dwz.core.js" type="text/javascript"></script>

<script class="lazyload" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" data-original="<%=basePath%>scripts/jquery-1.4.4.min.js"

type="text/javascript"></script>

<script class="lazyload" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" data-original="<%=basePath%>scripts/dwz.min.js" type="text/javascript"></script>

其中

dwz.core.js

DWZ 核心库主要功能是DWZ 初始化, Javascript String 增加了一些扩展方法.


3.主要代码

    

<script type="text/javascript">

$(function() {

DWZ.init("dwz.frag.xml", {

/* /*   loginUrl: "login_dialog.html", loginTitle: "登录", // 弹出登录对话框

      loginUrl:"login.html",    // 跳到登录页面 */

statusCode : {

ok : 200,

error : 300,

timeout : 301

}, //【可选】

pageInfo : {

pageNum : "pageNum",

numPerPage : "numPerPage",

orderField : "orderField",

orderDirection : "orderDirection"

}, //【可选】

debug : false, // 调试模式 【true|false】

callback : function() {

initEnv();

$("#themeList").theme({

themeBase : "themes"

}); // themeBase 相对于index页面的主题base路径

}

});

$("a[target=navTabTodo]", jParent).each(function() {

$(this).click(function(event) {

navTabTodo($(this).attr("href"));

event.preventDefault();

});

});

});

</script>

<body scroll="no">

<div id="layout">

<div id="leftside">

<div id="sidebar_s">

<div class="collapse">

<div class="toggleCollapse">

<div></div>

</div>

</div>

</div>

<div id="sidebar">

<div class="toggleCollapse">

<h2>主菜单</h2>

<div>收缩</div>

</div>

<div class="accordion">

<div class="accordionHeader">

<h2>

<span>Folder</span>功能管理

</h2>

</div>

<div class="accordionContent" >

<ul>

<li><a href="emp-list" target="navTab" rel="page1">test</a></li>

<li><a href="emp-input" target="navTab" rel="container">提示窗口</a></li>

<li><a href="user.do?method=remove" target="navTabTodo">删除</a></li>

<li><a href="w_alert.html" target="ajax" rel="container">提示窗口</a></li>

<li><a href="dwz.jsp" target="dialog" rel="container">弹出窗口</a></li>

<li><a href="/news.do?method=remove&id=${item.id}"

target="navTabTodo" title="确定要删除吗?">> 删除</a></li>

<li><a href="/news.do?method=publish&id=${item.id}"

target="navTabTodo">发表</a></li>


</ul>

</div>

<div class="accordionHeader">

<h2>

<span>Folder</span>账号导入

</h2>

</div>

<div class="accordionContent">

<ul>

<li><a href="mytest.jsp" target="navTab">新页面</a></li>

</ul>

</div>

<div class="accordionHeader">

<h2>

<span>Folder</span>导航管理

</h2>

</div>

<div class="accordionContent">

<ul class="tree  treeFolder treeCheck  collapse [treeFolder treeCheck [expand|collapse]]"

oncheck="kkk">

<li><a href="mytest.jsp" target="navTab" rel="main" tname="name"

tvalue="value" checked="true">第一级菜单项 A</a>

<ul>

<li><a href="emp-list" target="dialog" rel="dialog1" tname="name"

tvalue="value" checked="true">第二级菜单项 A </a></li>

<li><a href="emp-input" target="navTab" >第二级菜单项 B </a></li>

<li><a href="emp-input" target="navTab" >第二级菜单项 C </a>

<ul>

<li><a href="emp-input" target="navTab" >第三级菜单项 A </a></li>

<li><a href="emp-input" target="navTab" >第三级菜单项 B </a></li>

</ul></li>

</ul></li>

<li><a href="emp-input" target="navTab" >第一级菜单项 B</a></li>

</ul>

</div>

</div>

</div>

</div>

<div id="container">

<div id="navTab" class="tabsPage">

<div class="tabsPageHeader">

<div class="tabsPageHeaderContent">

<!-- 显示左右控制时添加 clas s="tabsPageHeaderMargin" -->

<ul class="navTab-tab">

<li tabid="main" class="main"><a href="javascript:;"><span><span

class="home_icon">我的主页</span></span></a></li>

</ul>

</div>

<div class="tabsLeft">left</div>

<!-- 禁用只需要添加一个样式 class="tabsLeft tabsLeftDisabled" -->

<div class="tabsRight">right</div>

<!-- 禁用只需要添加一个样式 class="tabsRight tabsRightDisabled" -->

<div class="tabsMore">more</div>

</div>

<ul class="tabsMoreList">

<li><a href="javascript:;">我的主页</a></li>

</ul>

<div class="navTab-panel tabsPageContent layoutBox">

<div class="page unitBox">

<div class="pageFormContent" layouth="80"

>我的主页</div>

</div>

</div>

</div>

</div>

</div>

<div id="footer">

</div>

</body>

</html>


点击查看更多内容
TA 点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
  • 推荐
  • 评论
  • 收藏
  • 共同学习,写下你的评论
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消