Common JavaScript technology (reproduced)

xiaoxiao2021-03-06  41

No title document </ Title></p> <p><meta http-equiv = "content-type" content = "text / html; charSet = GB2312"></p> <p><style type = "text / css"></p> <p><! -</p> <p>Body {</p> <p>Margin-left: 0px;</p> <p>Margin-top: 0px;</p> <p>Margin-Right: 0px;</p> <p>Margin-bottom: 0px;</p> <p>}</p> <p>-></p> <p></ style></p> <p></ hEAD></p> <p><body οnlοad = "window.open ('fullscreen.htm', '', 'fullscreen = 1, scroll = no'); window.opener = null; window.close ()></p> <p><Input Type = Button Value = Close οnclick = "Window.opener = NULL; Window.close ()"></p> <p><! - IE5.5 no pop-up prompt -></p> <p><Object ID = WebBrowser ClassID = CLSID: 8856F961-340A-11D0-A96B-00c04FD705A2 Height = 0 width = 0> </ Object></p> <p><Input Type = Button Value = Close window οnclick = document.all.webbrowser.execwb (45, 1)></p> <p></ body></p> <p></ html></p> <p>The key is to join in the OnLoad event:</p> <p>Window.opener = null; window.close ()</p> <p>Ready picture:</p> <p><Script language = "javascript"></p> <p><! - this script and many more area AVAILABLE FREE ONLINE AT -></p> <p><! - the javascript source !!</p> <p>http://javascript.internet.com -></p> <p><! - begin</p> <p>Image1 = new image ();</p> <p>Image1.src = "image1.gif";</p> <p>Image2 = new image ();</p> <p>Image2.src = "image2.gif";</p> <p>// end -></p> <p></ script></p> <p>About two web refreshing problems</p> <p>JS processing method:</p> <p>a.htm</p> <p><a href="b.htm" target=blank release message </A></p> <p><script></p> <p>Alert ("wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww");</p> <p></ script></p> <p>B.htm</p> <p><script language = "javascript"></p> <p>//Window.opener.location.Reload (); refresh father window</p> <p>//Window.opener.location="2.htm"// redirect parent window to 2.htm page</p> <p>Function closewindow ()</p> <p>{</p> <p>Window.opener.location.reload (); self.close ();</p> <p>Window.opener.document.write ("sssssssssssssssssss");</p> <p>}</p> <p></ script></p> <p><a href="b.htm" target=blank οnclick="closeWindow( );"> Close </A></p> <p>Background processing method:</p> <p>Private btnforsubmit (Object Sender, Eventargs E)</p> <p>{</p> <p>...........</p> <p>Response.write ("<script> window.opener.document.execcommand ('refresh'); window.opener = ''; window.close (); </ script>");</p> <p>// String str = "<script> window.opener.document.execcommand ('refresh'); window.opener = '; window.close (); </ script></p> <p>//this.registerStartupScript ("Physical";</p> <p>ShowModalDialog (), ShowModelessDialog () method use details</p> <p>JavaScript has many built-in methods to generate dialogs, such as Window.Art (), Window.confirm (), Window.Prompt (). Wait. However, IE provides more Method Support dialog. Such as:</p> <p>ShowModalDialog () (IE 4 Support)</p> <p>ShowModelessDialog () (IE 5 support)</p> <p>WINDOW.SHOWMODALDIALOG () method is used to create a modal dialog that displays HTML content, because it is a dialog, it is not generally all attributes of Window.Open ().</p> <p>WINDOW.SHOWMODELESSDIALOG () method is used to create a non-modular dialog that displays HTML content.</p> <p>When we use ShowModelessDialog () to open the window, you don't have to use Window.close () to close it. When you open in a non-modular manner [IE5], the window to open the dialog can still be used, ie the dialog is not always It is the top focus, when it turns on its window URL, it automatically shuts down. The dialog box of the modal [IE4] is always focus (the focus cannot be removed until it is closed). The modal dialog box and the window that opens its window, so when we open another window, their link relationship is still saved and hidden below the active window.</p> <p>The method is as follows:</p> <p>VreturnValue = WINDOW.SHOWMODALDIALOG (SURL [, Varguments] [, SFEATURES])</p> <p>VreturnValue = WINDOW.SHOWMODELESSDIALOG (SURL [, Varguments] [, SFEATURES])</p> <p>Parameter Description:</p> <p>SURL</p> <p>Required parameters, type: string. The URL of the document to specify the dialog to display.</p> <p>Varguments</p> <p>Optional parameters, type: variants. Used to deliver parameters to the dialog. Parameters passing are not limited, including arrays, and more. The dialog box has obtained the passing parameters via Window.Dialogarguments. SFEATURES</p> <p>Optional parameters, type: string. The information used to describe the appearance of the dialog box can use one or several of the following, separated by a semicolon ";".</p> <p>The Dialogheight dialog height, not less than 100px, IE4 DialogHeight and DialogWidth default unit is EM, and IE5 is PX, which is convenient to see it, in the dialog of the Modal mode, use PX to do units.</p> <p>Dialogwidth: dialog width.</p> <p>Dialogleft: Distance from the left desktop.</p> <p>Dialogtop: Distance from the desktop.</p> <p>Center: {YES | NO | 1 | 0}: Whether the window is hit, default Yes, but still specify the height and width.</p> <p>Help: {yes | no | 1 | 0}: Whether to display the help button, default Yes.</p> <p>Resizable: {YES | NO | 1 | 0} [IE5 ]: Whether it can be changed. Default NO.</p> <p>Status: {yes | no | 1 | 0} [IE5 ]: Whether the status bar is displayed. The default is YES [Modeless] or no [modal].</p> <p>Scroll: {YES | NO | 1 | 0 | ON | OFF}: Indicates whether the dialog box displays the scroll bar. Default is YES.</p> <p>There are also several properties to be used in HTA, which is generally not used in a general web page.</p> <p>DialoGHide: {yes | no | 1 | 0 | ON | OFF}: Whether the dialog box is hidden when printing or printing preview. The default is NO.</p> <p>Edge: {Sunken | Raised}: Indicates the border style of the dialog. Default is raised.</p> <p>Unadorned: {yes | no | 1 | 0 | ON | OFF}: The default is NO.</p> <p>Introduction parameters:</p> <p>To pass the parameters, it is passed through Varguments. Types are not limited, for string type, up to 4096 characters. You can also transfer objects, for example:</p> <p>TEST1.HTM</p> <p>====================</p> <p><script></p> <p>VAR MXH1 = New Array ("MXH", "Net_LOVER", "Menciic E Chapter")</p> <p>VAR MXH2 = WINDOW.OPEN ("About: Blank", "Window_MXH")</p> <p>/ / Pass an array to the dialog</p> <p>Window.ShowModalDialog ("Test2.htm", MXH1)</p> <p>/ / Pass the Window object to the dialog</p> <p>WINDOW.SHOWMODALDIALOG ("Test3.htm", MXH2)</p> <p></ script></p> <p>TEST2.HTM</p> <p>====================</p> <p><script> var a = window.dialogarguments</p> <p>Alert ("The parameters you pass are:" a)</p> <p></ script></p> <p>Test3.htm</p> <p>====================</p> <p><script></p> <p>Var a = window.dialogarguments</p> <p>Alert ("The parameters you pass are Window objects, name:" a.name)</p> <p></ script></p> <p>You can return information to the window to open the dialog over Window.ReturnValue, of course, can also be an object. E.g:</p> <p>TEST4.HTM</p> <p>===================</p> <p><script></p> <p>Var a = window.showmodaldialog ("test5.htm")</p> <p>For (i = 0; i <a.length; i ) ALERT (A</p> <p></ Script> test5.htm ============================= <script> function sendto () {var A = new array ("a", "b") Window . ReturnValue = a window.close ()} </ script> <body> <form> <input value = "Returns" Type = Button οnclick = "Sendto ()> </ form> FAQ: 1, how to mode Submit in the state dialog, not a new window? If your browser is IE5.5 , you can use the IFRAME with the Name property in the dialog, which can be developed when submitting the Name of the IFRAME. For IE4 , you can use the height of 0 Frame: example, test6.htm ============================ <script> window.showmodaldialog ("test7.htm" </ Script> test7.htm =================== f (window.location.search) Alert (window.location.search) <frameset rows = "0, * "> <Frame src =" about: blank "> <frame src =" test8.htm "> </ frameset> TEST8.HTM =================== < Form target = "_ self" method = "get"> <input name = txt value = "test"> <input type = submit> </ form> <script> if (window.location.search) Alert (Window.Location. Search) </ script> 2, can you pass the parameters directly from http: //servername/virtualdirName/test.htm? name = mxh method directly to the dialog box? The answer cannot be. But it is possible in Frame.</p> <p>// Shield F5 Refresh button function document.onkeydown () {var k = window.event.keycode; if (k == 116) // shield F5 refresh key {WINDOW.Event.KeyCode = 0; window.Event.ReturnValue = False;}} <script language = "javascript"> // Mask mouse right mouse button, Ctrl N, Shift F10, F5 refresh, back, check, Function window.onhelp () {return false} function keydown ) {//Alert (Event.keycode); // Shield Alt arrow keys ← Mask Alt arrow keys → (Window.Event.altkey) && ((Window.Event.Keycode == 37) || (Window.event .keycode == 39))) {// alert ("Do not allow you to use the Alt arrow key or back to the web!"); Event.ReturnValue = false;} // Mask Delax Delete button, shield F5 Refresh Key, Ctrl R IF ((Event.Keycode == 116) || (Event.ctrlKey && event.keycode == 82)) {event.keycode = 0; Event.ReturnValue = false;} // Shield Ctrl N IF ((( Event.ctrlKey) && (Event.KeyCode == 78)) {Event.ReturnValue = false;} // Shield Shift F10 IF && (Event.Keycode == 121)) {Event.ReturnValue = False;} // Shield SHIFT Rioli left button new open page IF (Window.Event.srce LEMENT.TAGNAME == "a" && window.event.shiftkey) {window.event.returnValue = false;} // shielded Alt F4 IF ((Window.Event.altKey) && (Window.Event.KeyCode == 115 )) {WINDOW.SHOWMODELESSDIALOG ("About: blank", "DialogWidth: 1px; DialogHeight: 1PX"); Return False;} // Shield Ctrl A IF (Event.KeyCode = = 65)) {Return False;}} </ script> </ body> </ html> <script language = "javascript"></p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-57647.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="57647" 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.038</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 = '6IPWkpK5jMKnWCTkL3mnxPTRlSNU3fxH1J2e55fGk_2FyjCDMdtoRsZGwEtXLc873BSxKYtG3aOWZoryigjE_2By_2FQ_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>