📄 right_position.html
字号:
<html style="background-color: buttonface; color: buttontext;"><head><meta http-equiv="content-type" content="text/xml; charset=gb2312" /><title>胖日历示例</title> <!-- calendar stylesheet --> <link rel="stylesheet" type="text/css" media="all" href="calendar-win2k-cold-1.css" title="win2k-cold-1" /> <!-- main calendar program --> <script type="text/javascript" src="calendar.js"></script> <!-- language for the calendar --> <script type="text/javascript" src="lang/calendar-zh.js"></script> <!-- the following script defines the Calendar.setup helper function, which makes adding a calendar a matter of 1 or 2 lines of code. --> <script type="text/javascript" src="calendar-setup.js"></script> <style type="text/css"> .special { background-color: #000; color: #fff; } </style></head><body><div style="float: right; margin-left: 1em; margin-bottom: 1em;"id="calendar-container"></div><script type="text/javascript"> var SPECIAL_DAYS = { 0 : [ 13, 24 ], // special days in January 2 : [ 1, 6, 8, 12, 18 ], // special days in March 8 : [ 21, 11 ] // special days in September }; function dateIsSpecial(year, month, day) { var m = SPECIAL_DAYS[month]; if (!m) return false; for (var i in m) if (m[i] == day) return true; return false; }; function dateChanged(calendar) { // Beware that this function is called even if the end-user only // changed the month/year. In order to determine if a date was // clicked you can use the dateClicked property of the calendar: if (calendar.dateClicked) { // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php var y = calendar.date.getFullYear(); var m = calendar.date.getMonth(); // integer, 0..11 var d = calendar.date.getDate(); // integer, 1..31 // redirect... window.location = "/" + y + "/" + m + "/" + d + "/index.php"; } }; Calendar.setup( { flat : "calendar-container", // ID of the parent element flatCallback : dateChanged, // our callback function dateStatusFunc : function(date, y, m, d) { if (dateIsSpecial(y, m, d)) return "special"; else return false; // other dates are enabled // return true if you want to disable other dates } } );</script><center><p>flat calendar:在页面的右侧显示的日历</p></center></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -