JavaScript ʼþ·½·¨
JavaScript ʼþ·½·¨
http://www.webdeveloping.cn/blog/?action=show&id=207
ʼþÔ´¶ÔÏó
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.activeElement
°ó¶¨Ê¼þ
document.captureEvents(Event.KEYDOWN);
·ÃÎÊ´°ÌåÔªËØ
document.all("txt").focus();
document.all("txt").select();
´°ÌåÃüÁî
document.execCommand
´°ÌåCOOKIE
document.cookie
²Ëµ¥Ê¼þ
document.oncontextmenu
´´½¨ÔªËØ
document.createElement("SPAN");
¸ù¾ÝÊó±ê»ñµÃÔªËØ£º
document.elementfromPoint(event.x,event.y).tagName=="TD
document.elementfromPoint(event.x,event.y).appendChild(ms)
´°ÌåͼƬ
document.images[Ë÷Òý]
´°Ìåʼþ°ó¶¨
document.onmousedown=scrollwindow;
ÔªËØ
document.´°Ìå.elements[Ë÷Òý]
¶ÔÏó°ó¶¨Ê¼þ
document.all.xxx.detachEvent('onclick',a);
²å¼þÊýÄ¿
navigator.plugins
È¡±äÁ¿ÀàÐÍ
typeof($js_libpath)=="undefined"
ÏÂÀ¿ò
ÏÂÀ¿ò.options[Ë÷Òý]
ÏÂÀ¿ò.options.length
²éÕÒ¶ÔÏó
document.getElementsByName("r1");
document.getElementById(id);
¶¨Ê±
timer=setInterval('scrollwindow()',delay);
clearInterval(timer);
UNCODE±àÂë
escape(),unescape
¸¸¶ÔÏó
obj.parentElement(dhtml)
obj.parentNode(dom)
½»»»±íµÄÐÐ
TableID.moveRow(2,1)
Ìæ»»CSS
document.all.csss.href="a.css";
²¢ÅÅÏÔʾ
display:inline
Òþ²Ø½¹µã
hidefocus=true
¸ù¾Ý¿í¶È»»ÐÐ
style="word-break:break-all"
×Ô¶¯Ë¢ÐÂ
<metaHTTP-EQUIV="refresh"CONTENT="8;URL=http://c98.yeah.net">
¼òµ¥Óʼþ
<ahref="mailto:aaa@bbb.com?subject=ccc&body=xxxyyy">
¿ìËÙתµ½Î»ÖÃ
obj.scrollIntoView(true)
ê
<aname="first">
<ahref="#first">anchors</a>
ÍøÒ³´«µÝ²ÎÊý
location.search();
¿É±à¼
obj.contenteditable=true
Ö´Ðв˵¥ÃüÁî
obj.execCommand
Ë«×Ö½Ú×Ö·û
/[^\x00-\xff]/
ºº×Ö
/[\u4e00-\u9fa5]/
ÈÃÓ¢ÎÄ×Ö·û´®³¬³ö±í¸ñ¿í¶È×Ô¶¯»»ÐÐ
word-wrap:break-word;word-break:break-all;
͸Ã÷±³¾°
<
Ïà¹ØÎĵµ£º
ÒýÑÔ
ÔÚJavaScriptÖÐÎÒÃÇʹÓÃÁËÒ»ÖÖ±»³ÆÎª JavaScript Object Notation(ËõдJSON)µÄÐÎʽ£¬·ÒëΪÖÐÎľÍÊÇ“JavaScript¶ÔÏó±íʾ·¨”¡£Ëü¿ÉÒÔ¼ò½éÇåÎúµØ½«¶ÔÏóµÄ½á¹¹ÃèÊö³öÀ´£¬´Ó¶ø´ó´ó½µµÍÁËÎÒÃǵŤ×÷Á¿²¢¼õÉÙÁËÊý¾ÝÁ¿¡£
JsonʾÀý
<script languag ......
ÍæÍ¸javascriptµ¯³ö´°¿Ú
--------------------------------------------------------------------------------
¡¡¡¡¾³£ÉÏÍøµÄÅóÓÑ¿ÉÄܻᵽ¹ýÕâÑùÒ»Ð©ÍøÕ¾£¬Ò»½øÈëÊ×Ò³Á¢¿Ì»áµ¯³öÒ»¸ö´°¿Ú£¬»òÕß°´Ò»¸öÁ¬½Ó»ò°´Å¥µ¯³ö£¬Í¨³£ÔÚÕâ¸ö´°¿ÚÀï»áÏÔʾһЩעÒâÊÂÏî¡¢°æÈ¨ÐÅÏ¢¡¢¾¯¸æ¡¢»¶Ó¹â¹ËÖ®ÀàµÄ»°»òÕß×÷ÕßÏëÒªÌØ±ðÌáʾµ ......
<input type=button value=ˢРonclick="window.location.reload()">
<input type=button value=ǰ½ø onclick="window.history.go(1)">
<input type=button value=ºóÍË onclick="window.history.go(-1)"> ......
jsµÄFunction¶ÔÏóÔÚµ÷Óùý³ÌÖоßÓÐÒ»¸öarguomentsÊôÐÔ£¬ËüÊÇÓɽű¾½âÊÍÆ÷´´½¨µÄ£¬ÕâÒ²ÊÇ´´½¨arguments¶ÔÏóΨһ;¾¶¡£arguments¶ÔÏó¿ÉÒÔ¿´×öÊÇÒ»¸öArray¶ÔÏó£¬Ëü¾ßÓÐlengthÊôÐÔ£¬¿ÉÒÔͨ¹ýÐòºÅ·ÃÎÊÿһ¸ö²ÎÊý¡£¶øÇÒ£¬Í¨¹ýarguments µÄcalleeÊôÐÔ¿ÉÒÔ»ñÈ¡¶ÔÖ»ÔÚÖ´ÐеÄFunction¶ÔÏóµÄÒýÓã¬ÈçÏ ......