คัดลอกรหัสต่อไปนี้เป็นการดีที่สุดที่จะใช้เครื่องมือแก้ไขระดับมืออาชีพเช่น 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">
<head>
<meta http-equiv = "content-type" content = "text /html; charset = utf-8" />
<title> หน้าเนื้อหาจับคู่ </title>
<style>
* {ตัวอักษรขนาด: 12px; -
html {padding: 0px; มาร์จิ้น: 0px; สไตล์ชายแดน: ไม่มี; ความกว้างของชายแดน: 0px; ล้น: อัตโนมัติ; พื้นหลังสี: buttonface; -
ร่างกาย {padding: 0px; มาร์จิ้น: 0px; สไตล์ชายแดน: ไม่มี; ความกว้างของชายแดน: 0px; พื้นหลังสี: buttonface; -
li {line-height: 24px; ความสูง: 24px; มาร์จิ้น: 10px 0px -10px 15px; -
A {color: blue; -
อินพุต {Border-Width: 1px; -
#output {Width: 90%; ความสูง: 150px; ล้น: อัตโนมัติ; -
</style>
<script>
var win;
ฟังก์ชั่น $ (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 ("เกี่ยวกับ: blank");
win.visible = true;
setInterval (function () {ลอง {win.document;} catch (e) {window.close ();}}, 1); // โปรแกรมจะออกโดยอัตโนมัติหลังจากปิดหน้าต่าง
// ปิดเบราว์เซอร์เมื่อถอนการติดตั้งหน้า
window.onunload = 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.sreneement;
$ ("currentobj"). bound = el;
$ ("currentobj"). innerhtml = el.tagname;
Showcapture (EL);
E.CancelBubble = true;
E.returnValue = FALSE;
กลับเท็จ;
-
ฟังก์ชั่น Showcapture (EL) {
ถ้า (! el) กลับ;
var oldborderstyle = el.style.borderstyle, oldBorderWidth = el.style.borderWidth, oldBorderColor = el.style.BorderColor;
el.style.border = "2px Solid Red";
settimeout (function () {ลอง {el.style.borderstyle = oldborderstyle; el.style.borderWidth = oldBorderWidth; el.style.BorderColor = oldBorderColor;} catch (e) {}}, 300);