다음 코드를 복사하십시오. EditPlus와 같은 전문 편집 도구를 사용하는 것이 가장 좋습니다.
코드는 다음과 같습니다.
<! doctype html public "-// w3c // dtd xhtml 1.0 Transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<헤드>
<meta http-equiv = "content-type"content = "text /html; charset = utf-8" />
<title> 페이지 컨텐츠 캡처 </title>
<스타일>
* {글꼴 크기 : 12px; }
html {패딩 : 0px; 여백 : 0px; 국경 스타일 : 없음; 테두리 width : 0px; 오버플로 : 자동; 배경색 : 버튼 페이스; }
바디 {패딩 : 0px; 여백 : 0px; 국경 스타일 : 없음; 테두리 width : 0px; 배경색 : 버튼 페이스; }
Li {line-height : 24px; 높이 : 24px; 여백 : 10px 0px -10px 15px; }
A {색상 : 파란색; }
입력 {border-width : 1px; }
#output {너비 : 90%; 높이 : 150px; 오버플로 : 자동; }
</스타일>
<cript>
var 승리;
함수 $ (s) {return document.getElementById (s); }
Window.onload = function () {
var myHeight = 320;
Window.Moveto (0,0);
window.resizeto (screen.availwidth, myHeight);
// 브라우저를 엽니 다
win = new ActiveXobject ( "internetexplorer.application");
win.left = 0; win.top = myHeight;
win.width = screen.availwidth; win.height = screen.availHeight- MyHeight;
win.navigate2 ( "about : blank");
win.visible = true;
setInterVal (function () {try {win.document;} catch (e) {window.close ();}}, 1); // 창을 닫은 후 프로그램이 자동으로 종료됩니다.
// 페이지가 제거되면 브라우저를 닫습니다
window.onload = function () {win.quit (); }
// 자동 캡처
setInterval (docapture, 1);
}
함수 docapture () {
노력하다{
win.document.onclick = capit;
} catch (e) {}
}
함수 capit () {
var d = win.document, w = d.parentwindow, e = w.event, el = e.srcelement;
$ ( "currentobj"). bound = el;
$ ( "currentobj"). innerHtml = el.tagname;
Showcapture (el);
e.cancelbubble = true;
e.returnvalue = false;
거짓을 반환합니다.
}
함수 showcapture (el) {
if (! el) 반환;
var oldborderstyle = el.style.borderstyle, OldborderWidth = el.style.borderwidth, OldborderColor = el.style.bordercolor;
el.style.border = "2px solid red";
settimeout (function () {try {el.style.borderstyle = OldborderStyle; el.style.borderwidth = OldborderWidth; el.style.bordercolor = OldborderColor;} catch (e) {}}, 300);