Javascript DOMѧϰ±Ê¼Ç3
Ô¤¶¨Ê±¼äÖ®ºóÖ´Ðк¯Êý
setTimeout("functionname",interval)
ÌáÈ¡×Ö·û´®ÖÐÊýÖµÐÅÏ¢
parseInt(string)
¸´Öƽڵã(ÊÇ·ñ¸´ÖÆ×Ó½Úµã)
cloneNode(true/false)
ɾ³ý×Ó½Úµã
removeChild()
Ìæ»»½Úµã
replaceChild(newChild,oldChild)
×Ó½ÚµãÅжÏ
hasChildNodes
Ïà¹ØÎĵµ£º
×ªÔØ×Ô£ºhttp://www.ruanyifeng.com/blog/2009/09/find_element_s_position_using_javascript.html
Áíһƪ£ºhttp://blog.csdn.net/ivan820819/archive/2009/09/03/4515122.aspx
ÖÆ
×÷
ÍøÒ³µÄ¹ý³ÌÖУ¬ÄãÓÐʱºòÐèÒªÖªµÀij¸öÔªËØÔÚÍøÒ³ÉϵÄÈ·ÇÐλÖá£
ÏÂÃæµÄ½Ì³Ì×ܽáÁËJavascriptÔÚÍøÒ³¶¨Î»·½ÃæµÄÏà¹ØÖª
ʶ¡£
Ò»¡¢ÍøÒ³µ ......
javascriptʵÏÖµ¯³ö´øÍ¸Ã÷Ч¹ûµÄ¿ÉÍ϶¯Í¼²ã
×î¾ÒòΪÐèÒªÒ»¸öµ¯³öͼ²ãЧ¹û£¬µ¯³öͼ²ãµ¹ÊÇÈÝÒ×ʵÏÖ£¬µ«¾ßÓÐÍ϶¯Ð§¹ûÈ´²»ÖªÔõôȥʵÏÖ£¬ÔÚÍøÉÏ×îÖÕÕÒµ½ÁËÒ»¸öÐèÒªµÄЧ¹û£¬´úÂëÒ²²»¶à£¬Ò»¿´´úÂëµÄ¾«Á¶£¬ÖªµÀÔ×÷ÕßÓ¦¸ÃÊÇjavascript¸ßÊÖ¼¶±ðµÄÈË£¬ÏÖÔÚ¾ö¶¨½èÀ´Ò»Óã¬ÎÒ°ÑËüÂÔ¼ÓÃÀ» ......
ʼþÔ´¶ÔÏó
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.createElement(nodename)
²åÈëÔªËØµ½Îĵµ½ÚµãÊ÷
parent.appendChild(child)
´´½¨Îı¾½Úµã
document.createTextNode(text)
ÔÚÏÖÓÐÔªËØÇ°²åÈëÐÂÔªËØ
parentElement.insertBefore(newElement,targetElement)
ÔÚÏÖÓÐÔªËØºó²åÈëÐÂÔªËØ£¨×ԱຯÊý£©
parentElement.insertAfter(newElement,targe ......