?? admin.js
字號:
window.onerror=function(a,b,c){return true;}
function textarea_resize(textareaname,textareamp)
{
var tt_num=5;
if (textareamp=='-') { tt_num=-5; }
var tt_obj=document.getElementById(textareaname);
if (parseInt(tt_obj.rows)+tt_num>=3) { tt_obj.rows = parseInt(tt_obj.rows) + tt_num; }
if (tt_num>0) { tt_obj.width="90%"; }
}
function re_load() { location.reload(); }
function click_return(cvar,ct)
{
var nvar='';
switch (ct)
{
case 1:
nvar='提示信息!';
default :
nvar='您確定要'+cvar+'嗎?\n\n執(zhí)行該操作后將不可恢復(fù)!';
}
var cf=window.confirm(nvar);
if (cf) { return true; }
return false;
}
function open_wins(url,name,width,height,scroll)
{
var nwidth=width;
var nheight=height;
var Left_size=0;
var Top_size=0;
if (nwidth==0 || nheight==0)
{
nwidth=screen.width-8;
nheight=screen.height-55;
}
else
{
Left_size=(screen.width) ? (screen.width-nwidth)/2 : 0;
Top_size=(screen.height) ? (screen.height-nheight)/2 : 0;
}
var open_wins=window.open(url,name,'width=' + nwidth + ',height=' + nheight + ',left=' + Left_size + ',top=' + Top_size + ',toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=' + scroll + ',resizable=yes' );
}
function open_win(url,name,width,height,scroll)
{
var Left_size = (screen.width) ? (screen.width-width)/2 : 0;
var Top_size = (screen.height) ? (screen.height-height)/2 : 0;
var open_win=window.open(url,name,'width=' + width + ',height=' + height + ',left=' + Left_size + ',top=' + Top_size + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + scroll + ',resizable=no' );
}
function jk_int(itp)
{
var knum=event.keyCode;
var ktrue=false;
if (knum >= 48 && knum <= 57) { ktrue=true; }
if (itp==1)
{
if (!ktrue && knum==46) { ktrue=true; }
}
return ktrue;
}
function slect_color(tcstr)
{
var c=window.showModalDialog("html_edit/win_select_color.asp","s","dialogWidth=300px;dialogHeight=270px;status=0");
var d=c;
if (c && c!="")
{
if (d.length==7) { d=d.substr(1,d.length); }
eval("window.document.all."+tcstr+".value=d;");
}
}
function frm_submitonce(theform)
{
if (document.all||document.getElementById)
{
for (var i=0;i<theform.length;i++)
{
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset") { tempobj.disabled=true; }
}
}
}
function frm_quicksubmit(eventobject) { if (event.keyCode==13 && event.ctrlKey) write_frm.submit(); }
//<input type=test name=tim value='2003-5-19' size=12 maxlength=10 readonly>
//<input type=button name=st_btn value="選擇" onclick="javascript:select_time(tim);return false;">
function select_time(st_obj)
{
var showx=event.screenX-event.offsetX-14;
var showy=event.screenY-event.offsetY-168;
var retval=window.showModalDialog("html_data.asp?"+st_obj.value,"","dialogWidth:197px; dialogHeight:210px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; status:no; directories:yes;scrollbars:no;Resizable=no;");
if( retval!=null ) { st_obj.value=retval; }
//else { }
}
//*****************選擇框 開始******************
function select_all(frm)
{
var slength=0;
if (frm.sel_id==null) { return false; }
var sall=frm.sel_all.checked;
if (frm.sel_id.length)
{
slength=frm.sel_id.length;
for (var i=0;i<slength;i++) { frm.sel_id[i].checked=sall; }
}
else { frm.sel_id.checked=sall; }
}
function sel_click(frm)
{
var slength=0;
var issel=false;
if (frm.sel_id!=null)
{
if (frm.sel_id.length)
{
slength=frm.sel_id.length;
for (var i=0;i<slength;i++) { if (frm.sel_id[i].checked==true) { issel=true; break; } }
}
else { if (frm.sel_id.checked==true) { issel=true; } }
}
if (issel==true)
{
if (confirm("執(zhí)行此操作后可能無法恢復(fù)!你確定嗎?")) { return true; }
else { return false; }
}
else { alert("沒有選擇任何記錄!"); return false; }
}
//*****************選擇框 結(jié)束******************
//***********默認(rèn)設(shè)置定義.*********************
var tPopWait=50; //停留tWait豪秒后顯示提示。
var tPopShow=6000; //顯示tShow豪秒后關(guān)閉提示
var showPopStep=20;
var popOpacity=95;
var tfontcolor="#000000";
var tbgcolor="#ffffff";
var tbordercolor="#808080";
//***************內(nèi)部變量定義*****************
var sPop=null,curShow=null,tFadeOut=null,tFadeIn=null,tFadeWaiting=null;
document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText { background-color: " + tbgcolor + ";color:" + tfontcolor + "; border: 1px " + tbordercolor + " solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
document.write("</style>");
document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");
function showPopupText()
{
var o=event.srcElement;
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);
}
}
}
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;
if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
else 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);
}
}
document.onmouseover=showPopupText;
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -