A plan for making a window

xiaoxiao2021-03-06  39

1. Open the notepad, add the following program, save as "myWindow.js" Note: Name is a MyWindow suffix is ​​.js, saved in "IMG" folder / * chromeless windows v.30.1generate a chromeless window IE4, IE5 .x, IE6 on WIN32 and a regular one on the others browsers. (c) Gabriel Suchowolski power [z] one / www.microbians.com / powerz@microbians.comDistributed under the terms of the GNU Library General Public License (www. gnu.org) * / function openchromeless (theURL, wname, W, H, NONEgrf, CLOSEdwn, CLOSEup, CLOSEovr, MINIdwn, MINIup, MINIovr, CLOCKgrf, titHTML, titWIN, winBORDERCOLOR, winBORDERCOLORsel, winBGCOLOR, winBGCOLORsel) {if (navigator. appName == "Microsoft Internet Explorer" && parseInt (navigator.appVersion)> = 4) {isie = trueif (navigator.appVersion.substring (navigator.appVersion.indexOf ( "MSIE") 5, navigator.appVersion.indexOf ( " Msie ") 8)> = 5.5) ISV55 = Trueelse isv55 = false} else isie = false} else isie = false} else (). ISWIN = TrueElse iswin = false var windowwwW = W; var window = h; var windowx = math.ceil ((Window.sc) Reen.width - windoww / 2); var windowy = math.ceil (window.screen.height - windowh) / 2); if (isie) {h = h 20 3; w = W 2; s = ", width = w ", height = " h; if (isie && iswin) {var chrometithtml = '/ n' '' '/ n' '' '/ n' ' chromeless windows / titlebar </ title>' '/ n' '<style type = "text / css">' '/ n' '# Crtmove {Position: absolute; LEFT: 0PX;</p> <p>TOP: 0px; z-index: 2;} ' ' / n ' ' # txttitle {position: absolute; left: 0px; Top: 0px; width: 100%; Height: 20px; z-index: 1; CLIP : RECT (0,100%, 20, 0);} ' ' / n ' ' # btnclose {Position: absolute; Left: -20px; Top: 4px; width: 11px; height: 11px; z-index: 3; CLIP: RECT (0, 11, 11, 0);} ' ' / n ' ' # btnmini {Position: absolute; Left: -20px; Top: 4px; Width: 11px; Height: 11px; z-index: 3; CLIP: RECT (0, 11, 11, 0);} ' ' / n ' ' # GrfClock {Position: Absolute; Left: -20px; Top: 4px; Width: 11px; Height: 11px; z- INDEX: 3; Clip: RECT (0, 11, 11, 0);} ' ' / n ' ' </ style> ' ' / n ' ' '/ n' '<script language = "JavaScript"> ' ' / n ' ' ' ' / n ' ' var imgclosedwn = new image (); imgClosedwn.src = "' closedwn '"; ' ' / n ' ' var IMGCloseup = new image (); imgCloseup.src = "' closeup '"; ' ' / n ' ' var imgcloseovr = new image (); imgCloseovr.src = "' closeovr '"; ' ' / n ' ' var imginidwn = new image (); imgminidwn.src = "' minidwn '"; ' ' / n ' ' var imgminiup = new imag e (); imgminiup.src = "' miniup '"; ' ' / n ' ' var imgminiovr = new image (); imgminiovr.src = "' miniovr '"; ' ' / n ' 'var clockgrfimg = new image ();</p> <p>Clockgrfimg.src = "' clockgrf '"; ' ' / n ' ' ' ' /n' 'Document.onselectionstart = new function ("Return False;") ' ' / n ' ' Document .ondragstart = new function ("Return False;") ' ' /n' 'document.ontextMenu = New function ("Return False;") ' ' /n' 'document.onmousemove = movewin ' ' / N ' ' ' ' / n ' ' var WinStatus = "Up"; ' ' / n ' ' var OFX = 0; ' ' / n ' ' var OFY = 0; ' ' / N ' ' var px = 0; ' ' / n ' ' var py = 0; ' ' / n ' ' '/ n' 'function setLayout () {' '/ n' ' Document.all ["btnClose"]. style.pixelleft = document.body.clientwidth-18 ' ' / n ' ' f (top.mainLoaded) {' ' / n ' ' Document.all ["GRFCLOCK" ] .style.visibility = "hidden"; ' ' / n 'IF (ISV55) {chrometithtml =' / n ' ' document.all ["btnmini"]. style.visibility = "visible"; ' ' / N ' ' Document.all ["btnmini"]. style.pixelleft = document.body.clientwidth-38; ' ' / n '} chrometithtml =' / n ' '} ' ' / n ' 'else {' '/ n' 'document.all ["btnmini"]. style.visibility = "hidden";' '/ n' 'document.all ["grfclock"]. style.pixelleft =</p> <p>Document.body.ClientWidth-38; ' ' / n ' ' setTimeout ("setLayout ()", 500); ' ' / n ' '} ' ' / n ' '} ' ' / n ' ' function minimizewin () {' ' / n ' ' top.window.moveto (0, -4000); ' ' / n ' ' IF ((Top.Opener) && (! Top.opener. Closed)) {top.opener.window.focus ();} ' ' / n ' ' Top.Window.blur () ' ' / n ' '} ' ' / n ' ' Function movewin ( ) {' ' / N ' ' IF (WinStatus == "DOWN") {' ' / n ' ' document.body.bgcolor = "' WinBGColorsel '" ' ' / n ' ' Parent. Bordt.Document.body.bgcolor = "' winbordercolorsel '" ' ' / n ' ' Parent.bordeb.Document.body.bgcolor = "' WinBorderColorsel '" ' ' / n ' ' Parent.Bordel. Document.body.bgcolor = "' WinBordercolorsel '" "' ' / n ' ' Parent.bor DER.Document.body.bgcolor = "' winbordercolorsel '" ' ' / n ' ' OFX = Event.x ' ' / n ' </p> <p>'OFY = Event.y' '/ n' 'WinStatus = "DRAG"' '/ n' '}' '/ n' 'Else IF (WinStatus == "Drag") {' ' / N ' ' PX = Event.Screenx - OFX; ' ' / N ' ' PY = Event.Screeny - Off; ' ' / n ' ' Top.Window.x = PX; ' ' / N ' ' top.window.y = py; ' ' / n ' ' top.window.moveto (px, py); ' ' / n ' '} else {' ' / n ' ' Document .BODY.BGCOLOR = "' WINBGCOLOR '" ' ' / n ' ' parent.bordt.document.body.bgcolor = "' winbordercolor '" ' ' / n ' ' parent.bordeb.document.body .BGCOLOR = "' WinBorderColor '" '/ n' 'parent.bordel.document.body.bgcolor = "' winbordercolor '"' '/ n' 'parent.border.document.body.bgcolor = "' winbordercolor '" ' ' / N ' ' WinStatus = "UP" ' ' / n ' '} ' ' / n ' '} ' ' / n ' ' <</p> <p>/ script> ' ' / n ' ' </ head> ' ' / n ' ' <body οnresize = "setLayout ()" BGColor = ' WINBGCOLOR '> ' ' / n ' ' <div ID = CRTMOVE> <img οnmοusedοwn = "WinStatus = / 'down /'; movewin ()" οnmοuseup = "WinStatus = / 'up /'; movewin ()" border = 0 src = " nonegrf " width = 110% HEIGHT = 500> </ div> ' ' / n ' <div id = txttitle>' '<Table Width = 100% Height = 20 border = 0 cellpadding = 0 cellspacing = 0> <Tr> <TD VALIGN = Middle Align = Left> ' Tithtml ' <</ TD> </ TR> </ Table> ' ' <div> ' ' / n ' <div id = btnclose> <img name = imgclose src = " ' CLOSEup '" border = 0 width = 11 height = 11 οnmοuseοver = "this.src = imgCLOSEovr.src" οnmοuseοut = "btnSTATUS = false; this.src = imgCLOSEup.src" οnmοuseup = "this.src = imgCLOSEup .SRC "οnmοusedοwn =" this.src = imgclosedwn.src "οnclick =" Top.Window.close () "> </ div> ' ' / n ' <div id = btnmini> <img name = imgmini src = " ' MINIup '" border = 0 width = 11 height = 11 οnmοuseοver = "this.src = imgMINIovr.src" οnmοuseοut = "btnSTATUS = false; this.src = imgMINIup.src" οnmοuseup = "this.src = Imgminiup.src "οnmοusedοwn =" this.src = imgminidwn.src "οnclick =" InimizeWin ()> </ div> ' '</p> <p>/ N ' ' <div id = grfclock> <img name = IMGCLOCK SRC = "" Border = 0 width = 11 height = 11> </ div> ' ' / n ' </ body > ' ' / N ' ' <script> setLayout () </ script> ' ' / n ' ' </ html> ' ' / n 'var chromefrmhtml =' '<html>' ' / n ' ' <head> ' ' / n ' ' <title> ' Titwin ' </ Title> ' ' / n ' ' </ head> ' ' / n ' ' <script > ' ' /N' 'top.mainLoaded = false ' ' / n ' ' function generateTitle () {' ' / n ' ' f (Window.frames ["frmtit"] && window.frames "Bordel"] && window.frames ["bordeb"] && window.frames ["border"] && window.frames ["bordem"]) {' ' / n ' ' frmTIT.Document.bgcolor = " WINBGCOLOR '"' '/ n' 'frmtit.document.open ();' '/ n' 'frmtit.document.write ("' quitaaltolinea (chrometithtml) ');' '/ n ' ' frmtit.document.close (); ' ' / n ' ' bordem.document.bgcolor = "' winbordercolor '" ' ' / n ' ' bordel.document.bgcolor = "' </p> <p>WinBorderColor '"' '/ n' 'border.document.bgcolor ="' WinBorderColor '"' '/ n' 'bordeb.document.bgcolor ="' WinborderColor '"' / n ' ' bordet.document.bgcolor = "' winbordercolor '" ' ' / n ' '} else {' ' / n ' ' settimeout ("generateTitle ()", 20) ' ' / N ' '} ' ' / n ' '} ' ' /n' 'top.window.h=' ' ' ' ' /n' 'top.window.w= ' w ' ' /n' 'top.window.x= ' WindowX ' '/n' 'top.window.y=' windowy ' ' / n ' ' generateTitle () ' ' / N ' ' </ script> '/ n' '<frameset οnlοad = "οnfο" = true "οnfοcus =" Top.Window.moveto (Top.Window.x, Top.Window.y) " Border = 0 framespacing = 0 frameborder = 0 COLS = "1,100%, 1"> ' ' / n ' ' <frame name = bordel src = "about: blank" scrolling = no noreSize> '/ n' '<frameset border = 0 framespacing = 0 frameborder = 0 rows = "1, 20, 1,100%, 1">' '/ n' '<frame name = bordet src = "about: blank" scrolling = no noreSize> ' ' / n ' ' <frame name = frmtit src = "about: blank" scrolling = no noreSize> ' ' / n ' ' <frame name =</p> <p>Bordem src = "about: blank" scrolling = no noreSize> ' ' / n ' ' <frame name = main src = "' theurl '"> '/ n' '<frame name = bordeb src = "About: blank" scrolling = no noreSize> ' ' / n ' ' </ frameset> '/ n' '<frame name = border src = "about: blank" scrolling = no noreSize>' ' / N ' ' </ frameset> ' ' / n ' ' </ html> 'splashwin = window.open ("", wname, "fulscreen = 1, toolbar = 0, location = 0, Directories = 0, Status = 0, menubar = 0, scrollbars = 0, resizable = 0 " s); if (! (navigator.useragent.tolowercase (). INDEXOF (" mozilla / 5 ")! = - 1)) {Splashwin.resizEther (Math.ceil (W), Math.ceil (h));} splashwin.moveto (Math.ceil (Windowx), Math.ceil (Windowy)); Splashwin.Document.Open (); Splashwin.Document.write Chromefrmhtml; splashwin.document.close ();} else {splashwin = window.open (theurl, wname, "Toolbar = 0, location = 0, Directories = 0, Status = 0, menubar = 0, Scrollba RS = 0, resizable = 1 " s, true);} splashwin.focus (); return splashwin} function Quitasaltolinea (txt) {var salida = txt.toString () var RE = g; var salida = salida.replace RE, "");</p> <p>Var RE = g; var salida = salida.replace (re, "); var RE = //" / g; var saida = salida.replace (re, "///" "); var RE = // ' / g; var salida = salida.replace (RE, "/// '"); var RE = // n / g; var saida = salida.replace (re, "// n"); var RE = / / g; var salida = salida.replace (re, "); var RE = // T / g; var saida = salida.replace (re," "); var RE = // r / g; var salida = Salida .replace Salida} 2, below is called page content: Plus between <head> and </ head>: <script language = javascript> Function Hover (ID, WERT) {IF ( Document.all [id] .filters.alpha.opacity = WERT;} </ script> <script language = javascript src = "img / myWindow.js" type = text / javascript> </ script> <script Language = JavaScript> Function openwin () {THEURL = "open.htm" W = "chromelesswin" w = 700; h = 500; closedwn = "img / close_dwn.gif" closeup = "img / close_up.gif" CloseoVR = " IMG / close_ovr.gif "minidwn =" img / mini_dwn.gif "miniup =" img / mini_up.gif "minioVR =" img / mini_ovr.gif "nonegrf =" img / none.gif "clockgrf =" IMG / clock.gif "Tithtml =" <fo Nt face = verdana color = # ffffff size = 1> My Cool window </ font> "Titwin =" how, my window is cool "WinBorderColor =" # 000000 "WinborderColorsel =" # ff6600 "WINBGCOLOR =" # 000000 "Winbgcolorsel =" # 666666 "Mywin =</p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-75938.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="75938" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.035</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = 'MabjB5nCopthRTPvyk4aTicSg2wiCp2fai_2F3AS1xRij0QELTm9DICAPXE2F_2BjY5uwXPLU72fPX2wF46BI_2FaGQg_3D_3D'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>