if(!document.all){
//zzcv의 ff ie 호환 스크립트
/* 스크립트로 해결되지 않는 문제 및 해결 방법:
2 IE에서는 () 또는 [를 사용할 수 있습니다. ] 컬렉션 클래스 개체를 가져옵니다. Firefox에서는 []만 사용하여 컬렉션 클래스 개체를 가져올 수 있습니다.
해결책: 컬렉션 클래스 개체를 가져오려면 []를 균일하게 사용하세요.
3. 일반 속성 가져오기. 사용자 정의 속성을 얻으려면 getAttribute()를 사용할 수도 있습니다. Firefox에서는 사용자 정의 속성을 얻기 위해 getAttribute()만 사용할 수 있습니다.
해결책: getAttribute()를 통해 균일하게 사용자 정의 속성을 가져옵니다. 🎜>4. IE에서는 HTML 객체의 ID를 문서의 하위 객체의 변수 이름으로 직접 사용할 수 있지만, Firefox에서는 HTML 객체 ID와 동일한 변수 이름을 사용할 수 없습니다. IE에서는 사용할 수 있지만 사용할 수는 없습니다.
해결책: document.idName 대신 document.getElementById("idName")를 사용하십시오. 오류를 줄이려면 동일한 HTML 객체 ID를 가진 변수 이름을 사용하지 않는 것이 가장 좋습니다. 변수를 선언할 때 모호함을 피하기 위해 항상 var를 추가하세요. >6. IE에서는 input.type 속성이 읽기 전용이지만 Firefox에서는 읽기-쓰기가 가능합니다.
8. IE에서는 showModalDialog 및 showModelessDialog를 통해 열 수 있습니다. Firefox에서는
9. 브라우저에서 body 태그를 완전히 읽기 전에 Firefox의 본문이 존재해야 하지만, 브라우저에서 body 태그를 완전히 읽은 후에는 IE의 본문이 있어야 합니다.
*/
//문서 호환
HTMLDocument.prototype.__defineGetter__("all",function(){
return this.getElementsByName("*");})
HTMLFormElement. 프로토타입.item=function(s){
return this.elements[s];};
HTMLCollection.prototype.item=function(s){
return this[s] };
//이벤트 호환
window.constructor.prototype.__defineGetter__("event",function(){
for(var o=arguments.callee.caller,e=null;o != null;o=o.caller){
e=o.arguments[0];
if(e&&(e instanceof Event))
return e;}
return null;})
window.constructor.prototype.attachEvent=HTMLDocument.prototype.attachEvent=HTMLElement.prototype.attachEvent=function(e,f){
this.addEventListener(e.replace(/^on/i ," "),f,false);};
window.constructor.prototype.detachEvent=HTMLDocument.prototype.detachEvent=HTMLElement.prototype.detachEvent=function(e,f){
this.removeEventListener( e.replace(/^on/i,""),f,false);};
with(window.Event.constructor.prototype){
__defineGetter__("srcElement ", function(){
return this.target;});
__defineSetter__("returnValue",function(b){
if(!b)this.preventDefault();})
__defineSetter__("cancelBubble",function(b){
if(b)this.stopPropagation();})
__defineGetter__("fromElement",function(){
var o=(this.type=="mouseover"&&this.관련Target)||(this.type=="mouseout"&&this.target)||null;
if(o)
while( o. nodeType!=1)
o=o.parentNode; type=="mouseover"&&this.target)||(this.type=="mouseout"&&this.관련Target)||null;
while(o.nodeType!=1)
o=o.parentNode;
return o;})
__defineGetter__("x",function(){
return this.pageX;});
__defineG etter__ ("y",function(){
return this.pageY;})
__defineGetter__("offsetX",function() {
return this.layerX;});
__defineGetter__("offsetY",function(){
return this.layerY;});
(window.Node.prototype){
replacementNode=function(o){
this.parentNode.replaceChild(o,this);}
RemoveNode=function(b와 호환됩니다. ){
if(b)
return this.parentNode .removeChild(this);
var range = document.createRange();
range.selectNodeContents(this); parentNode.replaceChild(range.extractContents(),this);}
swapNode=function(o){
return this.parentNode.replaceChild(o.parentNode.replaceChild(this,o),this);}
contains=function(o) {
return o?((o==this)?true:arguments.callee(o.parentNode)):false;}
}
//HTML元素兼容
with(window.HTMLElement .prototype){
__defineGetter__("parentElement",function(){
return(this.parentNode==this.ownerDocument)?null:this.parentNode;});
__defineGetter__("children",function(){
var c=[];
for(var i=0,cs=this.childNodes;i
c.push(cs[i]);}
return c;});
__defineGetter__("canHaveChildren",function(){
반환 !/^(area|base|basefont|col|frame|hr|img|br|input|isindex|link|meta|param) $/i.test(this.tagName);});
__defineSetter__("outerHTML",function(s){
var r=this.ownerDocument.createRange();
r.setStartBefore(this);
void this.parentNode.replaceChild (r.createContextualFragment(s),this)
return s;});
__defineGetter__("outerHTML",function(){
var as=this.attributes;
var str=" for(var i=0,al=as. length;i
str =" " as[i].name "="" as[i].value """;}
return this.canHaveChildren?str ">":str ">" this.innerHTML "" this.tagName ">";});
__defineSetter__("innerText",function(s){
return this.innerHTML=document.createTextNode(s);});
__defineGetter__("innerText",function(){
var r=this.ownerDocument.createRange();
r.selectNodeContents(this);
return r.toString();});
__defineSetter__("outerText",function(s){
void this.parentNode.replaceChild(document.createTextNode(s),this);
return s});
__defineGetter__("outerText",function(){
var r=this.ownerDocument.createRange();
r.selectNodeContents(this);
return r.toString();});
insertAdjacentElement=function(s,o){
return (s=="beforeBegin"&&this.parentNode.insertBefore(o,this))||(s=="afterBegin"&&this.insertBefore( o,this.firstChild))||(s=="beforeEnd"&&this.appendChild(o))||(s=="afterEnd"&&((this.nextSibling)&&this.parentNode.insertBefore(o,this.nextSibling )||this.parentNode.appendChild(o)))||null;}
insertAdjacentHTML=function(s,h){
var r=this.ownerDocument.createRange();
r.setStartBefore(this);
this.insertAdjacentElement(s,r.createContextualFragment(h));}
insertAdjacentText=function(s,t){
this.insertAdjacentElement(s,document.createTextNode(t)); }
}
//XMLDOM兼容
window.ActiveXObject=기능{
스위치{
case "XMLDom":
document.implementation.createDocument.call(this,"text /xml","", null);
//domDoc = document.implementation.createDocument("text/xml","", null);
휴식;
}
}
XMLDocument.prototype.LoadXML=기능{
for(var i=0,cs=this.childNodes,cl=childNodes.length;i
this.appendChild(this.importNode((new DOMParser()).parseFromString(s,"text/xml").documentElement,true));}
XMLDocument.prototype.selectSingleNode=Element. 프로토타입.selectSingleNode=함수{
return this.selectNodes(s)[0];}
XMLDocument.prototype.selectNodes=Element.prototype.selectNodes=함수{
var rt= [];
for(var i=0,rs=this.evaluate(s,this,this.createNSResolver(this.ownerDocument==null?this.documentElement:this.ownerDocument.documentElement),XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),sl =rs.snapshotLength;i
return rt;}
XMLDocument.prototype.__proto__.__defineGetter__("xml",function(){
시도{
새 XMLSerializer().serializeToString(this)을 반환;}
catch(e){
return document.createElement("div").appendChild(this.cloneNode(true)).innerHTML;}});
Element.prototype.__proto__.__defineGetter__("xml",function(){
시도{
return new XMLSerializer().serializeToString(this);}
catch(e){
return document.createElement("div").appendChild(this.cloneNode(true)).innerHTML;}});
XMLDocument.prototype.__proto__.__defineGetter__("text",function(){
return this.firstChild.textContent;});
Element.prototype.__proto__.__defineGetter__("text",function(){
return this.textContent;});
Element.prototype.__proto__.__defineSetter__("text",function(s){
return this.textContent=s;});
}

去掉重复并排序的方法:1、使用“Array.from(new Set(arr))”或者“[…new Set(arr)]”语句,去掉数组中的重复元素,返回去重后的新数组;2、利用sort()对去重数组进行排序,语法“去重数组.sort()”。

本篇文章给大家带来了关于JavaScript的相关知识,其中主要介绍了关于Symbol类型、隐藏属性及全局注册表的相关问题,包括了Symbol类型的描述、Symbol不会隐式转字符串等问题,下面一起来看一下,希望对大家有帮助。

怎么制作文字轮播与图片轮播?大家第一想到的是不是利用js,其实利用纯CSS也能实现文字轮播与图片轮播,下面来看看实现方法,希望对大家有所帮助!

本篇文章给大家带来了关于JavaScript的相关知识,其中主要介绍了关于对象的构造函数和new操作符,构造函数是所有对象的成员方法中,最早被调用的那个,下面一起来看一下吧,希望对大家有帮助。

方法:1、利用“点击元素对象.unbind("click");”方法,该方法可以移除被选元素的事件处理程序;2、利用“点击元素对象.off("click");”方法,该方法可以移除通过on()方法添加的事件处理程序。

本篇文章给大家带来了关于JavaScript的相关知识,其中主要介绍了关于面向对象的相关问题,包括了属性描述符、数据描述符、存取描述符等等内容,下面一起来看一下,希望对大家有帮助。

foreach不是es6的方法。foreach是es3中一个遍历数组的方法,可以调用数组的每个元素,并将元素传给回调函数进行处理,语法“array.forEach(function(当前元素,索引,数组){...})”;该方法不处理空数组。

本篇文章给大家带来了关于JavaScript的相关知识,其中主要介绍了关于BOM操作的相关问题,包括了window对象的常见事件、JavaScript执行机制等等相关内容,下面一起来看一下,希望对大家有帮助。


핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

Atom Editor Mac 버전 다운로드
가장 인기 있는 오픈 소스 편집기

Dreamweaver Mac版
시각적 웹 개발 도구

안전한 시험 브라우저
안전한 시험 브라우저는 온라인 시험을 안전하게 치르기 위한 보안 브라우저 환경입니다. 이 소프트웨어는 모든 컴퓨터를 안전한 워크스테이션으로 바꿔줍니다. 이는 모든 유틸리티에 대한 액세스를 제어하고 학생들이 승인되지 않은 리소스를 사용하는 것을 방지합니다.

DVWA
DVWA(Damn Vulnerable Web App)는 매우 취약한 PHP/MySQL 웹 애플리케이션입니다. 주요 목표는 보안 전문가가 법적 환경에서 자신의 기술과 도구를 테스트하고, 웹 개발자가 웹 응용 프로그램 보안 프로세스를 더 잘 이해할 수 있도록 돕고, 교사/학생이 교실 환경 웹 응용 프로그램에서 가르치고 배울 수 있도록 돕는 것입니다. 보안. DVWA의 목표는 다양한 난이도의 간단하고 간단한 인터페이스를 통해 가장 일반적인 웹 취약점 중 일부를 연습하는 것입니다. 이 소프트웨어는

mPDF
mPDF는 UTF-8로 인코딩된 HTML에서 PDF 파일을 생성할 수 있는 PHP 라이브러리입니다. 원저자인 Ian Back은 자신의 웹 사이트에서 "즉시" PDF 파일을 출력하고 다양한 언어를 처리하기 위해 mPDF를 작성했습니다. HTML2FPDF와 같은 원본 스크립트보다 유니코드 글꼴을 사용할 때 속도가 느리고 더 큰 파일을 생성하지만 CSS 스타일 등을 지원하고 많은 개선 사항이 있습니다. RTL(아랍어, 히브리어), CJK(중국어, 일본어, 한국어)를 포함한 거의 모든 언어를 지원합니다. 중첩된 블록 수준 요소(예: P, DIV)를 지원합니다.
