javascript²¶»ñ´°¿Ú¹Ø±Õʼþ
javascript²¶»ñ´°¿Ú¹Ø±ÕʼþÓÐÁ½ÖÖ·½·¨
1.ÓÃjavascriptÖØÐ¶¨Òå window.onbeforeunload() ʼþ
ÔÚjavascriptÀﶨÒåÒ»¸öº¯Êý¼´¿É
function window.onbeforeunload() { alert("¹Ø±Õ´°¿Ú")}
alert()ʼþ½«»áÔڹرմ°¿ÚǰִÐУ¬ÄãÒ²¿ÉÒÔÓû§¾ö¶¨ÊÇ·ñ¹Ø±Õ´°¿Ú
function window.onbeforeunload() {
if (event.clientX>document.body.clientWidth && event.clientY<0 ||event.altKey)
window.event.returnValue="È·¶¨ÒªÍ˳ö±¾Ò³Âð£¿";
}
2.ÓÃonUnload·½·¨
ÔÚbody ±êÇ©Àï¼ÓÈëonUnloadʼþ
body onUnload="myClose()"
È»ºóÔÚjavascriptÀﶨÒåmyClose()·½·¨
µ«ÊÇonUnload·½·¨ÊÇÔڹرմ°¿ÚÖ®ºóÖ´ÐУ¬²»ÊÇÔڹرմ°¿Ú֮ǰִÐУ¬Èç¹ûÄãÏëÔڹرմ°¿Ú֮ǰ×öÅжϣ¬ÇëÓõÚÒ»ÖÖ·½·¨
Ïà¹ØÎĵµ£º
/***************************by
garcon1986********************************/
Java is to
JavaScript what Car is to Carpet
ÂÛ̳½»Á÷£º´óÐ͵Äweb¿ª·¢ÉçÇø
http://www.webdeveloper.com/forum/index.php
W3CschoolsÖÐÎÄÕ¾£º¿ª·¢ÕßµÄʵÓÃ+Ñ§Ï°ÍøÕ¾
http://www.w3school.com.cn/js/index.asp
javascript³ ......
//×Ô´øµÄ´òÓ¡Ô¤ÀÀ WebBrowser.ExecWB(1,1) ´ò¿ª
Web.ExecWB(2,1) ¹Ø±ÕÏÖÔÚËùÓеÄIE´°¿Ú£¬²¢´ò¿ªÒ»¸öд°¿Ú
Web.ExecWB(4,1) ±£´æÍøÒ³
Web.ExecWB(6,1) ´òÓ¡
Web.ExecWB(7,1) ´òÓ¡Ô¤ÀÀ
Web.ExecWB(8,1) ´òÓ¡Ò³ÃæÉèÖÃ
Web.ExecWB(10,1) ²é¿´Ò ......
ʼþÔ´¶ÔÏó
event.srcElement.tagName
event.srcElement.type ²¶»ñÊÍ·Å
event.srcElement.setCapture();
event.srcElement.releaseCapture(); ʼþ°´¼ü
event.keyCode
event.shiftKey
event.altKey
event.ctrlKey ʼþ·µ»ØÖµ
event.returnValue Êó±êλÖÃ
event.x
event.y ´°Ìå ......
Ñ¡ÔñÔªËØ£ºdocument.getElementsByTagName£¬document.getElementsById,document.getElementsByName¡£
firstChild,lastChild,nextSibling£¬previousSibling
´´½¨ÔªËØ£ºdocument.createElement(),appendChild();
ɾ³ýÔªËØ£ºremoveC ......