📄 marcosjs.js
字号:
//=================HigroupBBS V4.00 Powered By Marcos 2004.10======================
//========================All Rights Reserved By Higroup===========================
//==============全部ASP程序代码编写由Marcos(孙华)完成,联系QQ26696782===============
var rate=20;
var obj;
var act=0;
var elmH=0;
var elmS=128;
var elmV=255;
var clrOrg;
var TimerID;
//***********默认设置定义.*********************
tPopWait=100;//停留tWait豪秒后显示提示。
tPopShow=60000;//显示tShow豪秒后关闭提示
showPopStep=20;
popOpacity=85;
//***************内部变量定义*****************
sPop=null;
curShow=null;
tFadeOut=null;
tFadeIn=null;
tFadeWaiting=null;
function showIt(){
dypopLayer.className=popStyle;
dypopLayer.innerHTML=sPop;
popWidth=dypopLayer.clientWidth;
popHeight=dypopLayer.clientHeight;
if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
else popLeftAdjust=0;
popTopAdjust=0;
dypopLayer.style.left=MouseX+12;//+document.body.scrollLeft+popLeftAdjust;
dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
dypopLayer.style.filter="Alpha(Opacity=0)";
fadeOut();
}
function fadeOut(){
if(dypopLayer.filters.Alpha.opacity<popOpacity) {
dypopLayer.filters.Alpha.opacity+=showPopStep;
tFadeOut=setTimeout("fadeOut()",1);
}else{
dypopLayer.filters.Alpha.opacity=popOpacity;
tFadeWaiting=setTimeout("fadeIn()",tPopShow);
}
}
function fadeIn(){
if(dypopLayer.filters.Alpha.opacity>0) {
dypopLayer.filters.Alpha.opacity-=1;
tFadeIn=setTimeout("fadeIn()",1);
}
}
if (navigator.appName.indexOf("Microsoft",0) != -1 && parseInt(navigator.appVersion)>=4) {
Browser=true;
}else{
Browser=false;
}
if (Browser) {
document.onmouseover=doRainbowAnchor;
document.onmouseout=stopRainbowAnchor;
}
function doRainbow(){
if (Browser && act != 1) {
act=1;
obj=event.srcElement;
clrOrg=obj.style.color;
TimerID=setInterval("ChangeColor()",100);
}
}
function stopRainbow(){
if (Browser && act != 0) {
obj.style.color=clrOrg;
clearInterval(TimerID);
act=0;
}
}
function doRainbowAnchor(){
if (Browser && act != 1) {
obj=event.srcElement;
//if(obj==null) return;
try{
while (obj.tagName != 'A' && obj.tagName != 'BODY') {
obj=obj.parentElement;
if (obj.tagName=='A' || obj.tagName=='BODY') break;
}
if (obj.tagName=='A' && obj.href != '') {
act=1;
clrOrg=obj.style.color;
TimerID=setInterval("ChangeColor()",100);
}
}catch(e){}
}
try{
var o=event.srcElement;
if(o.tagName!="A"&&o.tagName!="IMG"&&o.tagName!="BODY"&&o.tagName!="TD") return;
MouseX=event.x;
MouseY=event.y;
if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
if(o.dypop!=sPop){
sPop=o.dypop;
clearTimeout(curShow);
clearTimeout(tFadeOut);
clearTimeout(tFadeIn);
clearTimeout(tFadeWaiting);
if(sPop==null || sPop==""){
dypopLayer.innerHTML="";
dypopLayer.style.filter="Alpha()";
dypopLayer.filters.Alpha.opacity=0;
}else{
if(o.dyclass!=null) popStyle=o.dyclass
else popStyle="cPopText";
curShow=setTimeout("showIt()",tPopWait);
}
}
}catch(e){}
}
function stopRainbowAnchor(){
if (Browser && act != 0) {
if (obj.tagName=='A') {
obj.style.color=clrOrg;
clearInterval(TimerID);
act=0;
}
}
}
function ChangeColor(){
obj.style.color=makeColor();
}
function makeColor(){
if (elmS==0) {
elmR=elmV;
elmG=elmV;
elmB=elmV;
}else{
t1=elmV;
t2=(255-elmS)*elmV/255;
t3=elmH % 60;
t3=(t1-t2)*t3/60;
if (elmH<60) {
elmR=t1;
elmB=t2;
elmG=t2+t3;
}else if (elmH<120) {
elmG=t1;
elmB=t2;
elmR=t1-t3;
}else if (elmH<180) {
elmG=t1;
elmR=t2;
elmB=t2+t3;
}else if (elmH<240) {
elmB=t1;
elmR=t2;
elmG=t1-t3;
}else if (elmH<300) {
elmB=t1;
elmG=t2;
elmR=t2+t3;
}else if (elmH<360) {
elmR=t1;
elmG=t2;
elmB=t1-t3;
}else {
elmR=0;
elmG=0;
elmB=0;
}
}
elmR=Math.floor(elmR);
elmG=Math.floor(elmG);
elmB=Math.floor(elmB);
clrRGB='#'+elmR.toString(16)+elmG.toString(16)+elmB.toString(16);
elmH=elmH+rate;
if (elmH>=360)
elmH=0;
return clrRGB;
}
function newLine(frm){
theLine1.innerHTML+="<br>"+"<input name=\"otherName\" type=\"text\" id=\"otherName\" value=\"\" size=\"8\" maxlength=\"4\">";
theLine2.innerHTML+="<br>"+" <input name=\"otherValue\" type=\"text\" id=\"otherValue\">";
}
function checkIt(frm){
var i,mess;
i=0;
mess="";
if(frm.userName.value==""){
i++;
mess+=i+".请填写您所要注册的用户名;\n";
}
if(frm.passWord.value==""||frm.conPassWord.value==""){
i++;
mess+=i+".请填写您的密码及密码确认;\n";
}else{
if(frm.passWord.value!=frm.conPassWord.value){
i++;
mess+=i+".您两次所输入的不一致;\n";
}
}
if(frm.userBirthday.value==""){
i++;
mess+=i+".请填写您的出生日期;\n";
}
if(frm.userGroup.value==""){
i++;
mess+=i+".请填写\"来自\"选项;\n";
}
if(i==0){
frm.Submit.disabled=true;
frm.submit();
}else{
alert(mess);
return false;
}
}
function checkIt2(frm){
var i,mess;
i=0;
mess="";
if(frm.passWord.value!=frm.conPassWord.value){
i++;
mess+=i+".您两次所输入的不一致;\n";
}
if(frm.userBirthday.value==""){
i++;
mess+=i+".请填写您的出生日期;\n";
}
if(frm.userGroup.value==""){
i++;
mess+=i+".请填写\"来自\"选项;\n";
}
if(i==0){
frm.Submit.disabled=true;
frm.submit();
}else{
alert(mess);
return false;
}
}
function checkLogin(frm){
if(frm.userName.value==""){
alert("请填写您的用户名!");
frm.userName.focus();
return false;
}
if(frm.passWord.value==""){
alert("请填写您的密码!");
frm.passWord.focus();
return false;
}
frm.submit();
frm.Submit5.disabled=true;
}
function ubb(th){
var midValue;
if(th.value.indexOf("*")==-1){
th.form.content.value+="["+th.value+"]";
th.value+="*";
th.form.content.focus();
}else{
midValue=th.value.substr(0,th.value.length-1);
th.form.content.value+="[/"+midValue+"]";
th.value=midValue;
th.form.content.focus();
}
}
function logout(th){
if(confirm("你真的要退出登录吗?")){
th.href="login.asp?theAct=out";
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -