Indonesia
<HTML> <HEAD> <TITLE></TITLE> <META content="text/html; charset=gb2312" http-equiv=Content-Type> <META content="MSHTML 5.00.2920.0" name=GENERATOR> <skrip > <!-- // objek menu fungsi konteksMenu() { this.items = new Array(); this.addItem = fungsi (item) { this.items[this.items.length] = item; } this.show = fungsi (oDoc) { var strShow = ""; var saya; strShow = "<div id="rightmenu" style="WARNA LATAR BELAKANG: #ffffff; BATAS: #000000 1 piksel padat; KIRI: 0 piksel; POSISI: mutlak; ATAS: 0 piksel; VISIBILITAS: tersembunyi; Z-INDEKS: 10">"; strShow += "<batas tabel="0" tinggi=""; strShow += this.items.length * 20; strShow += "" cellpadding="0" spasi sel="0" >"; strShow += "<tr tinggi="3"><td bgcolor="#d0d0ce" lebar="2"></td><td>"; strShow += "<batas tabel="0" lebar="100%" tinggi="100%" cellpadding=0 spasi sel=0 bgcolor="#ffffff">"; strShow += "<tr><td bgcolor="#d0d0ce" width="23"></td><td><img src=" " height="1" border= "0"></td></tr></tabel>"; strShow += "</td><td lebar="2"></td></tr>"; strShow += "<tr><td bgcolor="#d0d0ce"></td><td>"; strShow += "<batas tabel="0" lebar="100%" tinggi="100%" cellpadding=3 spasi sel=0 bgcolor="#ffffff">"; oDoc.write(strShow); for(i=0; i<ini.item.panjang; i++) { ini.item[i].show(oDoc); } strShow = "</tabel></td><td></td></tr>"; strShow += "<tr tinggi="3"><td bgcolor="#d0d0ce"></td><td>"; strShow += "<batas tabel="0" lebar="100%" tinggi="100%" cellpadding=0 spasi sel=0 bgcolor="#ffffff">"; strShow += "<tr><td bgcolor="#d0d0ce" width="23"></td><td><img src=" " height="1" border= "0"></td></tr></tabel>"; strTampilkan += "</td><td></td></tr>"; strTampilkan += "</table></div>n"; oDoc.write(strShow); } } // item menu objek fungsi konteksItem(teks, ikon, cmd, ketik) { ini.teks = teks ? teks : ""; ini.ikon = ikon ? ikon : ""; ini.cmd = cmd ? cmd : ""; ini.tipe = ketik ? ketik : "menu"; this.show = fungsi (oDoc) { var strShow = ""; if(ini.tipe == "menu") { strShow += "<tr "; strShow += "onmouseover="changeStyle(ini, 'on');" "; strShow += "onmouseout="changeStyle(ini, 'keluar');" "; strShow += "onclick=""; strShow += ini.cmd; strShow += "">"; strShow += "<td class="ltdexit" lebar="16">"; if (ini.icon == "") strShow += " "; else { strShow += "<img border="0" src=""; strShow += this.icon; strShow += "" width="16" height="16" style= "POSISI: relatif"></img>"; } strShow += "</td><td class="mtdexit">"; strTampilkan += ini.teks; strShow += "</td><td class="rtdexit" width="5"> </td></tr>"; } else if (this.type == "separator") { strShow += "<tr><td class="ltdexit"> </td>"; strShow += "<td class="mtdexit" colspan="2"><hr color="#000000" size="1"></td></tr>"; } oDoc.write(strShow); } } fungsi changeStyle(obj, cmd) { if(obj) coba { var imgObj = obj.children(0).children(0); if(cmd == 'on') { obj.children(0).className = "ltdfocus"; obj.anak-anak(1).className = "mtdfocus"; obj.anak-anak(2).className = "rtdfocus"; if(imgObj) { if(imgObj.tagName.toUpperCase() == "IMG") { imgObj.style.left = "-1px"; imgObj.style.top = "-1px"; } } } else if(cmd == 'keluar') { obj.children(0).className = "ltdexit"; obj.anak-anak(1).className = "mtdexit"; obj.anak-anak(2).className = "rtdexit"; if(imgObj) { if(imgObj.tagName.toUpperCase() == "IMG") { imgObj.style.left = "0px"; imgObj.style.top = "0px"; } } } } catch (e) {} } function showMenu() { var x, y, w, h, ox, oy; x = acara.klienX; y = acara.klienY; var obj = document.getElementById("menu kanan"); jika (obj == null) mengembalikan nilai benar; lembu = dokumen.body.clientWidth; oy = dokumen.body.clientHeight; if(x > lembu || y > oy) menghasilkan false; w = obj.offsetWidth; h = obj.offsetHeight; if((x + w) > lembu) x = x - w; jika((y + h) > oy) y = y - h; obj.style.posLeft = x + document.body.scrollLeft; obj.style.posTop = y + dokumen.body.scrollTop; obj.style.visibility = "terlihat"; kembali salah; } fungsi hideMenu() { if(event.button == 0) { var obj = document.getElementById("rightmenu"); jika (obj == null) mengembalikan nilai benar; obj.style.visibility = "tersembunyi"; obj.style.posLeft = 0; obj.style.posTop = 0; } } fungsi gaya tulis() { var strStyle = ""; strStyle += "<tipe GAYA=teks/css>"; strStyle += "TABEL {Font-FAMILY: "Tahoma","Verdana","宋体"; UKURAN FONT: 9pt}"; strStyle += ".mtdfocus {WARNA LATAR BELAKANG: #ccccff; BORDER-BOTTOM: #000000 1px solid; BORDER-TOP: #000000 1px solid; KURSOR: tangan}"; strStyle += ".mtdexit {WARNA LATAR BELAKANG: #ffffff; BORDER-BOTTOM: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid}"; strStyle += ".ltdfocus {WARNA LATAR BELAKANG: #ccccff; BORDER-BOTTOM: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; CURSOR: hand}"; strStyle += ".ltdexit {WARNA LATAR BELAKANG: #d0d0ce; BORDER-BOTTOM: #d0d0ce 1px solid; BORDER-TOP: #d0d0ce 1px solid; BORDER-LEFT: #d0d0ce 1px solid}"; strStyle += ".rtdfocus {WARNA LATAR BELAKANG: #ccccff; BORDER-BOTTOM: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-RIGHT: #000000 1px solid; CURSOR: hand}"; strStyle += ".rtdexit {WARNA LATAR BELAKANG: #ffffff; BORDER-BOTTOM: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; BORDER-RIGHT: #ffffff 1px solid}"; strGaya += "</GAYA>"; dokumen.write(strStyle); } fungsi makeMenu() { var myMenu, item; var homepage_cmd = "this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.downcodes.com/'); return false;"; var favorit_cmd = "window.external.addFavorite('http://www.downcodes.com/','建站学院'); return false;"; var viewcode_cmd = "window.location = 'sumber tampilan:' + window.location.href"; myMenu = konteksMenu baru(); item = new konteksItem("返回主页", "", "top.location='http://www.downcodes.com/';", "menu"); myMenu.addItem(item); item = new konteksItem("设为主页", "", homepage_cmd, "menu"); myMenu.addItem(item); item = new konteksItem("添加到收藏夹", "", favorit_cmd, "menu"); myMenu.addItem(item); item = new konteksItem("联系作者", "", "location.href='mailto:info@downcodes.com'", "menu"); myMenu.addItem(item); item = new konteksItem("", "", "", "pemisah"); myMenu.addItem(item); item = new konteksItem("察看源码", "", viewcode_cmd, "menu"); myMenu.addItem(item); myMenu.show(ini.dokumen); hapus barang; hapus Menu saya; } fungsi toggleMenu(isEnable) { if(isEnable) document.oncontextmenu = showMenu; else document.oncontextmenu = fungsi baru() {return true;}; } gaya tulis(); makeMenu(); dokumen.onclick = sembunyikanMenu; dokumen.oncontextmenu = showMenu; file://--> </script> </HEAD> <body marginwidth = "0" marginheight = "0" leftmargin = "0" topmargin = "0"> <tabel border = "0" width = "100% " height="100%" cellpadding="0" cellpacing="3"> <tr><td valign="top"> <div id="docBoard" style="width: 100%"> 超酷的XP风格的网页右键菜单特效代码http://www.downcodes.com/htmldata/sort/5.html </div> </td> <td valign="top" align="right"> <p><jenis input ="checkbox" name="closerm" onclick="toggleMenu(!this.checked);">关闭右键菜单</p> </td> </tr> </table> </body> </HTML>