标签:
项目中使用到了dhtmlxTree这个控件,所以在下班后了解了一下dhtmlx这个JavaScript 库。目前只是粗浅的看看,和写一些简单的Demo。先会用吧,下面就其中的一些组件做点总结。本篇博客就从calendar开始。<head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> //引入的资源 <script type="text/javascript" src="codebase/dhtmlx.js"></script> <link href="codebase/dhtmlx.css" rel="stylesheet" type="text/css"/> <style> #calendar{ border: 1px solid #909090; font-family: Tahoma; font-size: 12px; } </style> <title>Insert title here</title> </head> <body onload="doOnLoad()" > <div style="position:relative;height:280px;"> <input id="calendar" type="text"> </body> <script> var myCalendar; var myDivCalendar; function doOnLoad() { myCalendar = new dhtmlXCalendarObject("calendar"); } </script> </html>
<body onload="doOnLoad()" > <div style="position:relative;height:280px;"> <input id="calendar" type="text"> </div> <div id="divCalendar" style="position:relative;height:280px;"> </div> </body> <script> var myCalendar; var myDivCalendar; function doOnLoad() { myCalendar = new dhtmlXCalendarObject("calendar"); myDivCalendar = new dhtmlXCalendarObject("divCalendar"); myDivCalendar.show(); } </script>
<link href="skins/web/dhtmlx.css" rel="stylesheet" type="text/css"/>
myCalendar.setSkin("dhx_web");
dhtmlXCalendarObject.prototype.langData["chinese"] = { dateformat: "%d.%m.%Y", monthesFNames: [ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月" ], monthesSNames: [ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月" ], daysFNames: [ "周一", "周二", "周三", "周四", "周五", "周六", "周日" ], daysSNames: ["一", "二", "三", "四", "五", "六", "日"], weekstart: 7, weekname: "周" };
myCalendar.loadUserLanguage('chinese');
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:
原文地址:http://blog.csdn.net/zhuojiajin/article/details/47157211