[Transfer] Add IE methods and properties to MoizLLA

xiaoxiao2021-03-06  14

New Document </ title> <meta name = "generator" content = "editplus"> <meta name = "author" content = "flashsoft"> <meta name = "keywords" content = ""> <meta name = "description" Content = "Flashsoft"> <meta http-equiv = "content-type" content = "text / html; charset = GB2312"> <script language = "javascript" type = "Text /JavaScript">>! - IE5 macie5 ​​mozilla konqueror2.2 opent.cance yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes no no event.srcElement yes yes no no no event.fromElement yes yes no no no * / Event.prototype .__ defineSetter __ ( "returnValue", function (b) {// if (b) this.preventDefault ();! return b ;}); Event.Prototype .__ definesetter__ ("cancelbubble", function (b) {// Set or retrieve the level of the current event handle IF (b) this.stoppropagation (); return b;}); Event.Prototype .__ definegetter __ ("srcelement", function () {var node = this.target; while (node.nodetype! = 1) node = node.parentNode; Return Node;}); Event.Prototype .__ definegetter __ ("Fromelement", function () {// Returns the source node of the mouse removed VAR Node; if (this.type == "mouseover") node = this.relatedTARGET; Else IF This.Type == "mouseout") node = this.target; if (! node) return; while (node.nodetype! = 1) node = node.parentnode; return node;}); Event.Prototype .__ Definegetter__ (" TOEEEEMENT ", FUNCTION () {// Return to the source node var node; if (this.type ==" mouseout ") node = this.relatedTARGet;</p> <p>Else if (this.type == "mouseover") Node = this.target; if (! node) return; while (node.nodetype! = 1) node = node;}; Event.Prototype. __definegetter __ ("offsetx", function () {return this.layerx;}); Event.Prototype .__ definegetter __ ("offsety", function () {return this.Layry;};} if (window.document) {// Document correcting the DOM / * IE5 MacIE5 Mozilla Konqueror2.2 Opera5 document.documentElement yes yes yes yes no document.activeElement yes null no no no * /} if (window.Node) {// Node correction of DOM / * IE5 MacIE5 Mozilla Konqueror2.2 Opera5 Node.contains yes yes no no yes Node.replaceNode yes no no no no Node.removeNode yes no no no no Node.children yes yes no no no Node.hasChildNodes yes yes yes yes no node.childNodes yes yes yes Yes no no no no node.currentStyle yes yes no no no * / node.prototype.replacenode = function (node) {// Replace the specified node this .parentNode.replaceChild (Node, this);} Node.prototype.removeNode = function (removeChildren) {// delete the specified node if (removeChildren) return this.parentNode.removeChild (this); else {var range = document.createRange ( ); range.selectNodeContents (this); return this.parentNode.replaceChild (range.extractContents (), this);}} Node.prototype.swapNode = function (node) {// switching node var nextSibling = this.nextSibling; var parentNode = this.parentNode; node.parentNode.replaceChild (this, Node); parentNode.insertBefore (node, nextSibling);}} if (window.HTMLElement) {HTMLElement.prototype .__ defineGetter __ ( "all", function () {var A = this.getlementsBytagname ("*"); var node =</p> <p>this; a.tags = function (sTagName) {return node.getElementsByTagName (sTagName);} return a;}); HTMLElement.prototype .__ defineGetter __ ( "parentElement", function () {if (this.parentNode == this.ownerDocument Return null; return this.parentNode;}); htmlelement.prototype .__ definegetter __ ("child", function () {var TMP = []; var j = 0; var n; for (var i = 0; i <THIS .childnodes.Length; i ) {n = this.childNodes [i]; if (nODETYPE == 1) {TMP [J ] = n; if (n.name) {if (! TMP [n.name] TMP [N.NAME] = []; TMP [N.Name] [TMP [N.Name] .length] = n;}}}} = n;}} Return TMP ;}); HTMLElement.prototype .__ defineGetter __ ( "currentStyle", function () {return this.ownerDocument.defaultView.getComputedStyle (this, null);}); HTMLElement.prototype .__ defineSetter __ ( "outerHTML", function (sHTML) { Var r = this.ownerDocument.createrange (); r.setStartBefore (this); var DF ​​= r.createContextualFragment (shtml); this.parentnode.replacechild (DF, this); return shtml;}; htmlelement.protot Ype .__ definegetter __ ("OuteHTML", Function () {var attr; var attack = this.attributes; var str = "<" this.tagname; for (var i = 0; i <attrs.length; i ) {Attr = attrs [i]; if (attr.specified) str = "" attr.name '= "' attr.Value '";} if (! this.canhavechildren) Return Str ">"; Return Str >>> " this.innerhtml </" this.tagname ">";}); htmlelement.prototype .__ definegetter __ ("canhavechildren", function () {switch (this.tagname.tolowercase () {casse "</p> <p>Area ": Case" Base ": Case" Basefont ": Case" frame ": Case" HR ": Case" IMG ": Case" Br ": Case" Input ": Case" isindex ": case" LINK ": Case" Meta ": Case" param ": returnaf false;} return true;});</p> <p>HTMLElement.prototype .__ defineSetter __ ( "innerText", function (sText) {var parsedText = document.createTextNode (sText); this.innerHTML = parsedText; return parsedText;}); HTMLElement.prototype .__ defineGetter __ ( "innerText", function () {var r = this.ownerDocument.createRange (); r.selectNodeContents (this); return r.toString ();}); HTMLElement.prototype .__ defineSetter __ ( "outerText", function (sText) {var parsedText = document.createTextNode (sText); this.outerHTML = parsedText; return parsedText;}); HTMLElement.prototype .__ defineGetter __ ( "outerText", function () {var r = this.ownerDocument.createRange (); r.selectNodeContents (this); return r .tostring ();}; htmlelement.prototype.attachevent = function (stype, fhandler) {var hastletteame = stype.replace (/ on /, "); fhandler._ieemueventhandler = function (e) {window.Event = E Return fhandler ();} this.addeventListener (shorttypename, fhandler._ieemueventhandler, false);} htmlelement.prototype.detachevent = function (stype, fhandler) {var ShortTypename = SType.replace (/ on /, ""); if (typeof (fHandler._ieEmuEventHandler) == "function") this.removeEventListener (shortTypeName, fHandler._ieEmuEventHandler, false); else this.removeEventListener (shortTypeName, fHandler, true );} HTMLElement.prototype.contains = function (node) {// if a certain node do if (node ​​== this) return true; while (node ​​= Node.parentNode); return false;} HTMLElement.prototype.insertAdjacentElement = function (where, parsedNode) {switch (where) {case "beforeBegin": this.parentNode.insertBefore (parsedNode, this); break; case "afterBegin": this.insertBefore (parsedNode, this.firstChild);</p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-49356.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="49356" 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.049</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 = 'AMkDcIk4UvxYBq2lApzkem2HmPLe0cuLUWOcwaOzuZ9J4_2FMvcoE6_2Fzpt0a3lROGJ4AnQtgN2OJogh9Tl'; 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>