EasyShop/siteAdmin/js/func.js
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
//帮助显示与关闭
var helpDivName="",isCloseHelpDiv=true;
//帮助提示层名称,提示信息,层宽度,层高度,层上边距,层左边距
function helpTip(helpName,helpTitle,msg,divWidth)
{
//checkHelp();
var a=document.getElementById(helpName);
a.style.display="block";
a.style.width=divWidth+"px";
var divLeft=divWidth-36;
a.style.left="-"+divLeft+"px";
msg="<a href=\"javascript:helpDivClose('"+helpName+"');\" class='closeBtn' title='点击关闭'>X</a><table border=0 cellpadding=0 cellspacing=0 width=100%><tr><td><strong>"+helpTitle+"</strong><p>"+msg+"</p></td></tr></table>";
a.innerHTML=msg;
helpDivName=helpName;
isCloseHelpDiv=false;
}
function helpDivClose(divName)
{
document.getElementById(divName).style.display="none";
}
document.onclick=checkHelp;
function checkHelp(e)
{
if (isCloseHelpDiv==true && helpDivName!="")
{
document.getElementById(helpDivName).style.display='none';
}
isCloseHelpDiv=true;
}
//end ------------帮助显示与关闭
//判断日期格式: MM/DD/YY MM/DD/YYYY MM-DD-YY MM-DD-YYYY
function dateCheck(dateStr) {
var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{4})$/; // requires 4 digit year
var matchArray = dateStr.match(datePat); // is the format ok?
if (matchArray == null) {
return false;
}
month = matchArray[1]; // parse date into variables
day = matchArray[3];
year = matchArray[4];
if (month < 1 || month > 12) { // check month range
return false;
}
if (day < 1 || day > 31) {
return false;
}
if ((month==4 || month==6 || month==9 || month==11) && day==31) {
return false;
}
if (month == 2) { // check for february 29th
var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
if (day>29 || (day==29 && !isleap)) {
return false;
后面还有 272 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。