js/rl.js
(开头部分) 13KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
var cal;
var isFocus=false;
function SelectDate(o,p,strFormat)
{
var date = new Date();
var by = date.getFullYear()-50;
var ey = date.getFullYear()+50;
var obj = document.getElementById(o);
cal = (cal==null) ? new Calendar(by, ey, 0) : cal;
if(arguments.length > 2&&strFormat!=null)
{
cal.dateFormatStyle = strFormat;
}
if(arguments.length == 1)
{
cal.show(obj);
}
else
{
var pop = document.getElementById(p);
cal.show(obj,pop);
}
}
String.prototype.toDate = function(style) {
var y = this.substring(style.indexOf('y'),style.lastIndexOf('y')+1);
var m = this.substring(style.indexOf('M'),style.lastIndexOf('M')+1);
var d = this.substring(style.indexOf('d'),style.lastIndexOf('d')+1);
if(isNaN(y)) y = new Date().getFullYear();
if(isNaN(m)) m = new Date().getMonth();
if(isNaN(d)) d = new Date().getDate();
var dt ;
eval ("dt = new Date('"+ y+"', '"+(m-1)+"','"+ d +"')");
return dt;
}
Date.prototype.format = function(style) {
var o = {
"M+" : this.getMonth() + 1,
"d+" : this.getDate(),
"h+" : this.getHours(),
"m+" : this.getMinutes(),
"s+" : this.getSeconds(),
"w+" : "天一二三四五六".charAt(this.getDay()),
"q+" : Math.floor((this.getMonth() + 3) / 3),
"S" : this.getMilliseconds()
}
if(/(y+)/.test(style)) {
style = style.replace(RegExp.$1,
(this.getFullYear() + "").substr(4 - RegExp.$1.length));
}
for(var k in o){
if(new RegExp("("+ k +")").test(style)){
style = style.replace(RegExp.$1,
RegExp.$1.length == 1 ? o[k] :
("00" + o[k]).substr(("" + o[k]).length));
}
}
return style;
};
function Calendar(beginYear, endYear, lang, dateFormatStyle) {
后面还有 319 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。