이 기사에서는 JS가 창을 닫을 때 생성 된 이벤트 및 사용법에 대해 설명합니다. 다음과 같이 참조에 대해 공유하십시오.
/********************창을 닫고 평가를 닫고 평가를 제출하십시오 ******************/Window.onbeforeUnload = function () {var pagewidth = math.max (wind var pageheight = math.max (wind var cltheight = math.max (window.top.document.body.clientHeight, wind var 너비 = 400; var 높이 = 200; var layer = window.top.document.getElementById ( "zz_layer"); if (layer! = null) {layer.parentNode.RemoveChild (Layer); } // 마스크 계층 var rayer = window.top.document.createElement ( "div"); layer.id = "zz_layer"; layer.style.filter = "alpha (incacity = 38)"; // ie Layer.style.opacity = "0.38"; // ff layer.style.width = pagewidth + "px"; layer.style.height = PageHeight + "PX"; layer.style.position = "절대"; layer.style.top = 0; layer.style.left = 0; layer.style.backgroundColor = "#000"; layer.style.zindex = "9998"; window.top.document.body.appendChild (레이어); // 평가 창 var newbox = document.getElementById ( "kf_pj_div"); newbox.style.zindex = "9999"; newbox.style.display = "블록"; newbox.style.width = width + "px"; newbox.style.height = height + "px"; newbox.style.border = "#565656 4px solid"; newbox.style.background = "#ffffff"; newbox.style.position = "절대"; newbox.style.left = pagewidth/2 + "px"; newbox.style.top = (cltheight/2) + "px"; if (height/2> (cltheight/2)) {newbox.style.margintop = ( - (cltheight/2)) + "px"; } else {newbox.style.margintop = ( - height/2) + "px"; } if (width/2> (pagewidth/2)) {newbox.style.marginleft = ( - (pagewidth/2)) + "px"; } else {newbox.style.marginleft = (-Width/2) + "PX"; } 반품 "고객 서비스에 대해서는 아직 댓글을 달지 않았습니다. '취소'등급을 클릭하십시오!"; }; function mydiv_resize () {var pagewidth = math.max (wind var pageheight = math.max (wind var cltheight = math.max (window.top.document.body.clientHeight, wind var cltwidth = math.max (window.top.document.body.body.clientWidth, wind var 너비 = 400; var 높이 = 200; var layer = window.top.document.getElementById ( "zz_layer"); if (layer! = null) {// 마스크 레이어 Layer.style.width = pagewidth + "px"; layer.style.height = PageHeight + "PX"; } // 평가 창 var newbox = document.getElementById ( "kf_pj_div"); newbox.style.left = cltwidth/2 + "px"; newbox.style.top = (cltheight/2) + "px"; if (height/2> (cltheight/2)) {newbox.style.margintop = ( - (cltheight/2)) + "px"; } else {newbox.style.margintop = ( - height/2) + "px"; } if (width/2> (pagewidth/2)) {newbox.style.marginleft = ( - (pagewidth/2)) + "px"; } else {newbox.style.marginleft = (-Width/2) + "PX"; }} window.onresize = mydiv_resize;JavaScript 관련 컨텐츠에 대한 자세한 내용은이 사이트의 주제를 확인하십시오. "JavaScript Window Operation and Skills Summary", "JAVASCRIPT SCRIPITION의 JSON 운영 기술 요약", "JavaScript 특수 효과 및 기술 요약 JavaScript 검색 알고리즘 기술의 요약 및 Javascript Scriint의 Javascript Skulor 및 Debging Sknick의 기술 요약"Javascript Sknired 및 Debgging ","Javascript Scription ","Javascript Scripport of JavaScript 검색 알고리즘 기술 요약 ","Javascript " JavaScript Traversal 알고리즘 및 기술의 "및"JavaScript 수학적 작업 사용 요약
이 기사가 모든 사람의 JavaScript 프로그래밍에 도움이되기를 바랍니다.