Salin kode berikut, yang terbaik adalah menggunakan alat pengeditan profesional seperti EditPlus.
Kodenya adalah sebagai berikut:
<! Doctype html public "-// w3c // dtd xhtml 1.0 transisi // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "konten tipe" content = "text /html; charset = utf-8" />
<Title> Halaman Konten Capture </iteme>
<tyle>
* {font-size: 12px; }
html {padding: 0px; margin: 0px; Gaya perbatasan: Tidak ada; Perbatasan-lebar: 0px; meluap: otomatis; Latar Belakang-Color: Buttonface; }
tubuh {padding: 0px; margin: 0px; Gaya perbatasan: Tidak ada; Perbatasan-lebar: 0px; Latar Belakang-Color: Buttonface; }
li {line-height: 24px; Tinggi: 24px; margin: 10px 0px -10px 15px; }
A {Color: Blue; }
input {border-width: 1px; }
#Output {width: 90%; Tinggi: 150px; meluap: otomatis; }
</tyle>
<script>
var win;
fungsi $ (s) {return document.getElementById (s); }
window.onload = function () {
var myheight = 320;
window.moveto (0,0);
window.resizeto (screen.availwidth, myheight);
// Buka browser
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 () {coba {win.document;} catch (e) {window.close ();}}, 1); // program akan secara otomatis keluar setelah jendela ditutup
// Tutup browser saat halaman tidak diinstal
window.onunload = function () {win.quit (); }
// Penangkapan Otomatis
setInterval (Docapture, 1);
}
function docapture () {
mencoba{
win.document.onClick = Capit;
} catch (e) {}
}
function 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;
mengembalikan false;
}
function showCapture (el) {
if (! el) kembali;
var oldborderstyle = el.style.borderstyle, oldborderwidth = el.style.borderwidth, oldbordercolor = el.style.bordercolor;
el.style.border = "2px solid red";
setTimeout (function () {coba {el.style.borderstyle = oldborderstyle; el.style.borderwidth = oldborderwidth; el.style.bordercolor = oldbordercolor;} tangkap (e) {}}, 300);