📄 openmicwin.js
字号:
//
function openMicWin(theURL, wname, W, H, CLOSEdwn, CLOSEup, CLOSEovr, NONEgrf, CLOCKgrf, resizePIC, resizePICover, miniPIC,miniPICover,winTIT, winREALtit , winBORDERCOLOR, windeepCOLOR,winBORDERCOLORsel, winBGCOLOR, FS) {
var windowW = W;
var windowH = H;
var windowX = Math.ceil( (window.screen.availwidth - windowW) / 2 )-10;
var windowY = Math.ceil( (window.screen.availHeight - windowH) / 2 )-100;
if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion)>=4) isie=true
else isie=false
if (isie) { H=H+22+10+2; W=W+10+10+2; }
s = ",width="+W+",height="+H;
if (isie && (navigator.userAgent.toLowerCase().indexOf("win")!=-1) ) {
var dowin = theURL != "" ? true : false;
var chromeTIThtml = '\n' +
'<html>'+'\n'+
'<head>'+ '\n'+
'<title> CHROMELESS WINDOWS / TITLEBAR</title>'+ '\n'+
'<style type="text/css">'+ '\n'+
'#mywinTITLE { position: absolute; left: 0px; top: 0px; width: 100%; height: 22px; z-index: 1; background-color: '+windeepCOLOR+'; clip:rect(0,100%,22,0); }'+ '\n'+
'#mywindow { position: absolute; left: 0px; top: 0px; width: 100%; height: 22px; z-index: 2; clip:rect(0,100%;22,0); }'+ '\n'+
'#mywindowCLOSE { position: absolute; left: -22px; top: -22px; width: 11px; height: 11px; z-index: 3;clip:rect(0,11,11,0);}'+ '\n'+
'#mywindowSIZE { position: absolute; left: -22px; top: -22px; width: 11px; height: 11px; z-index: 3;clip:rect(0,11,11,0);}'+ '\n'+
'#mywindowSIZE { position: absolute; left: -22px; top: -22px; width: 11px; height: 11px; z-index: 3;clip:rect(0,11,11,0);}'+ '\n'+
'#mywindowMinimize { position: absolute; left: -22px; top: -22px; width: 11px; height: 11px; z-index: 3;clip:rect(0,11,11,0);}'+ '\n'+
'#myCLOCKgrf { position: absolute; left: -22px; top: -22px; width: 11px; height: 11px; z-index: 3;clip:rect(0,11,11,0);}'+ '\n'+
'</style>'+ '\n'+
'<script language="javascript">'+ '\n'
if ( theURL != "" ) {
chromeTIThtml = chromeTIThtml +
' theURL= "'+theURL+'" '+ '\n'+
' CLOSEdwn= "'+CLOSEdwn+'" '+ '\n'+
' CLOSEup= "'+CLOSEup+'" '+ '\n'+
' CLOSEovr= "'+CLOSEovr+'" '+ '\n'+
' CLOCKgrf= "'+CLOCKgrf+'" '+ '\n'+
' resizePIC= "'+resizePIC+'" '+ '\n'+
' resizePICover= "'+resizePICover+'" '+ '\n'+
' miniPIC= "'+miniPIC+'" '+ '\n'+
' miniPICover= "'+miniPICover+'" '+ '\n'+
' winBORDERCOLOR= "'+winBORDERCOLOR+'" '+ '\n'+
' winBORDERCOLORsel= "'+winBORDERCOLORsel +'" '+ '\n'+
' winBGCOLOR= "'+winBGCOLOR+'" '+ '\n'
} else {
chromeTIThtml = chromeTIThtml +
' theURL="about:blank" '+ '\n'+
' CLOSEdwn = "image/close_a.gif" '+ '\n'+
' CLOSEup = "image/close_d.gif" '+ '\n'+
' CLOSEovr = "image/close_o.gif" '+ '\n'+
' CLOCKgrf = "image/clock.gif" '+ '\n'+
' resizePIC = "image/resize.gif" '+ '\n'+
' resizePICover = "image/resize_o.gif" '+ '\n'+
' miniPIC = "image/minimize_a.gif" '+ '\n'+
' miniPICover = "image/minimize_b.gif" '+ '\n'+
' winTIT = "<font face=verdana size=1> \uFFFDwindow title</font>" '+ '\n'+
' winBORDERCOLOR = "#000000" '+ '\n'+
' winBORDERCOLORsel = "#FF8A00" '+ '\n'+
' winBGCOLOR = "#d7dcd9" '+ '\n'
}
chromeTIThtml = chromeTIThtml +
'var windowCLOSEIMGdwn = new Image(); windowCLOSEIMGdwn.src = CLOSEdwn; '+ '\n'+
'var windowCERRARImg_d = new Image(); windowCERRARImg_d.src = CLOSEup; '+ '\n'+
'var windowCERRARImg_o = new Image(); windowCERRARImg_o.src = CLOSEovr; '+ '\n'+
'var windowSIZEImg = new Image(); windowSIZEImg.src = resizePIC; '+ '\n'+
'var windowSIZEImg_o = new Image(); windowSIZEImg_o.src = resizePICover; '+ '\n'+
'var windowMinimize_a = new Image(); windowMinimize_a.src = miniPIC; '+ '\n'+
'var windowMinimize_b = new Image(); windowMinimize_b.src = miniPICover; '+ '\n'+
'var CLOCKgrfImg = new Image(); CLOCKgrfImg.src = CLOCKgrf; '+ '\n'+
' '+ '\n'+
'var wbig='+FS+'\n'+
'function wRs(){'+'\n'+
'if(wbig){'+'\n'+
//' top.window.moveTo('+windowX+','+windowY+');'+'\n'+
//' top.window.resizeTo('+windowW+','+windowH+');'+'\n'+
//' top.MainFrame.OaFrame.rows="0,0,*"'+'\n'+
//' top.MainFrame.OaMainFrame.cols="0,0,*"'+'\n'+
//' top.MainFrame.location.href="asp/main_blank.asp";'+'\n'+
' top.window.moveTo('+(screen.width-600)/2+',20);'+'\n'+
' top.window.resizeTo(600,400);'+'\n'+
' wbig=false;'+'\n'+
' }'+'\n'+
'else if(!wbig){'+'\n'+
' scw=screen.availWidth;'+'\n'+
' sch=screen.availHeight;'+'\n'+
//' top.MainFrame.history.back();'+'\n'+
' top.window.moveTo(0,0);'+'\n'+
' top.window.resizeTo(scw,sch);'+'\n'+
' wbig=true;'+'\n'+
' }'+'\n'+
'}'+'\n'+
'function wresizesmall()'+'\n'+
'{'+'\n'+
' parent.window.moveTo(100,50);'+'\n'+
' parent.window.resizeTo(600,430);'+'\n'+
' wsmall=true;'+'\n'+
'}'+'\n'+
'function wresizebig()'+'\n'+
'{'+'\n'+
' scw=screen.availWidth;'+'\n'+
' sch=screen.availHeight;'+'\n'+
' parent.window.moveTo(0,0);'+'\n'+
' parent.window.resizeTo(scw,sch);'+'\n'+
' wsmall=false;'+'\n'+
'}'+'\n'+
'function mouseSTATUS() { '+ '\n'+
' this.x = null; '+ '\n'+
' this.y = null; '+ '\n'+
' this.bt = "up"; '+ '\n'+
' this.oldx = null; '+ '\n'+
' this.oldy = null; '+ '\n'+
' this.dx = null; '+ '\n'+
' this.dy = null; '+ '\n'+
' this.screeny = null; '+ '\n'+
' this.screenx = null; '+ '\n'+
' '+ '\n'+
' this.element = null; '+ '\n'+
' this.event = null; '+ '\n'+
'} '+ '\n'+
' '+ '\n'+
'var mouse = new mouseSTATUS(); '+ '\n'+
' '+ '\n'+
'function actualizateMouseSTATUS(e) { '+ '\n'+
' if (!e) var e = event'+ '\n'+
' if ( (e.type=="mousedown" || e.type=="mouseup") && e.button!=1) return true'+ '\n'+
' '+ '\n'+
' var x=e.x+document.body.scrollLeft '+ '\n'+
' var y=e.y+document.body.scrollTop '+ '\n'+
' '+ '\n'+
' mouse.x = x; '+ '\n'+
' mouse.y = y; '+ '\n'+
' '+ '\n'+
' if ( e.type == "mousedown" ) mouse.bt = "down";'+ '\n'+
' else if ( e.type == "mouseup" ) mouse.bt = "up";'+ '\n'+
' '+ '\n'+
' if (window.event) { '+ '\n'+
' mouse.screenx=window.event.screenX; '+ '\n'+
' mouse.screeny=window.event.screenY; '+ '\n'+
' } else { '+ '\n'+
' mouse.screenx=-1; '+ '\n'+
' mouse.screeny=-1; '+ '\n'+
' } '+ '\n'+
' '+ '\n'+
'} '+ '\n'+
' '+ '\n'+
' '+ '\n'+
'function initMouseEvents() {'+ '\n'+
' document.onmousedown = actualizateMouseSTATUS'+ '\n'+
' document.onmousemove = actualizateMouseSTATUS'+ '\n'+
' document.onmouseup = actualizateMouseSTATUS'+ '\n'+
' document.onselectstart = selectstart '+ '\n'+
' document.ondragstart = new Function("actualizateMouseSTATUS(event); return false;") '+ '\n'+
' document.oncontextmenu = new Function("return false;") '+ '\n'+
'} '+ '\n'+
' '+ '\n'+
'function selectstart(){ '+ '\n'+
' if ( event.srcElement.tagName != "INPUT" && event.srcElement.tagName != "TEXTAREA") { return false; } '+ '\n'+
' else { mouse.bt="up"; return true; } '+ '\n'+
'} '+ '\n'+
' '+ '\n'+
'initMouseEvents() '+ '\n'+
' '+ '\n'+
'var mywindowbt ="up"; '+ '\n'+
'var wincloseSTATUS="up"; '+ '\n'+
' '+ '\n'+
'var ofx=0;'+ '\n'+
'var ofy=0;'+ '\n'+
'var opx=0;'+ '\n'+
'var opy=0; '+ '\n'+
'var px=0;'+ '\n'+
'var py=0; '+ '\n'+
' '+ '\n'+
'var wcpx1=-1, wcpy1=-1; '+ '\n'+
'var wcpx2=-1, wcpy2=-1; '+ '\n'+
' '+ '\n'+
'var wsizechanged = false;'+'\n'+
'var wclosechanged = false; '+ '\n'+
'var minichanged = false; '+ '\n'+
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -