⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 operate.js

📁 5237 论坛.rar
💻 JS
字号:
var currentpos,timer;
function initialize()
{timer=setInterval("scrollwindow()",1);}
function sc(){clearInterval(timer);	}
function scrollwindow()
{currentpos=document.body.scrollTop; window.scroll(0,++currentpos);
if (currentpos != document.body.scrollTop) sc();}
document.onmousedown=sc
document.ondblclick=initialize

function System()
{
document.form1.Face.disabled=false;
document.form1.PFace.value="无";
document.form1.PWidth.value="0";
document.form1.PHeight.value="0";
document.form1.PFace.disabled=true;
document.form1.PWidth.disabled=true;
document.form1.PHeight.disabled=true;
}
function UserDo()
{
document.form1.Face.disabled=true;
document.form1.PFace.disabled=false;
document.form1.PWidth.disabled=false;
document.form1.PHeight.disabled=false;
}

function RUR(ID)
{
if (confirm("删除专栏会同时删除下属版面与帖子,您是否要继续操作?"))
window.location = "Admin_Type.asp?Action=DelType&I="+ID
}

function RURS(ID)
{
if (confirm("删除版面会同时删除下属帖子,您是否要继续操作?"))
window.location = "Admin_Type.asp?Action=DelSubject&I="+ID
}

function Logout()
{
if (confirm("您确定退出吗?"))
window.location = "Logout.asp"
}

function openScript(url, width, height)
{
var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
}

function PayAssets(S,I,H)
{
if (confirm("浏览该帖子需要花费您的社区财产" + H + "吨,您要继续吗?"))
window.location = "Judge.asp?S="+S+"&I="+I
}

function CheckMailBox(I,N)
{
if (confirm("您有" + N + "封新邮件是否现在查看?"))
window.location = "Letter.asp?I=" + I
}

function ToPage(Page)
{
document.form1.Page.value=Page
document.form1.submit()        
}

function DoTitle(addTitle) { 
var revisedTitle; 
var currentTitle = document.form1.Title.value; 
revisedTitle = currentTitle+addTitle; 
document.form1.Title.value=revisedTitle; 
document.form1.Title.focus(); 
return; 
}

function inputs(str)
{
document.form1.Content.value=document.form1.Content.value+str;
}

function fob(n, d)
{
var p,i,x;
if(!d)
d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length)
{
d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);
}
if(!(x=d[n])&&d.all)
x=d.all[n];
for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=fob(n,d.layers[i].document);
return x;
}

function vdf()
{
var i,p,q,nm,t,num,min,max,e='',a=vdf.arguments;
for (i=0; i<(a.length-2); i+=3)
{
t=a[i+2];val=fob(a[i]);
val1=val.value;
if (val)
{
nm=a[i+1];
if ((val=val.value)!="")
{
if (t.indexOf('pwd') != -1)
{
val2=fob(t.substring(t.indexOf(':')+1));
if (val1!=val2.value)
e+='两次密码输入不相同.\n';
else if (val2.value.length<5)
e+='密码长度应大于等于5个字符.\n';
}
if (t.indexOf('len') != -1)
{
p=t.indexOf(':');
l=t.substring(p+1);
if (val1.length<l)
e+=nm+'长度应大于等于'+l+'个字符.\n';
}
if (t.indexOf('sel') != -1)
{
p=t.indexOf(':');
l=t.substring(p+1);
if (val1 == l)
e+='请输入-'+nm+'\n';
}
if (t.indexOf('mail')!=-1)
{
p=val.indexOf('@');
if (p<1 || p==(val.length-1))
e+=nm+'邮件地址无效.\n';
}
if (t.indexOf('num')!=-1)
{
num = parseFloat(val);
if (val!=''+num)
e+=nm+'必须是数字.\n';
}
if (t.indexOf('inRange') != -1)
{
num = parseFloat(val);
p=t.indexOf(':');
min=t.substring(8,p);
max=t.substring(p+1);
if (num<min || max<num || val!=''+num)
e+=nm+'信息不合理 应在'+min+'与'+max+'之间.\n';
}
}
else
{
if (t.charAt(0) == 'R')
e += nm+'为必填项.\n';
}
}
}
if (e)
alert('下列信息输入错误:\n'+e);
document.vdfValue=(e=='');return(e=='');
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -