DHTML (JavaScript Dom ±à³ÌÒÕÊõ)
DHTMLÊÇ""dynamic HTML"(¶¯Ì¬HTML)µÄ¼ò³Æ.ÑϸñµØ˵,DHTML²¢²»ÊÇÒ»Ïîµ¥Ò»µÄм¼Êõ,¶øÊÇHTML,CSSºÍJavaScriptÕâÈýÖÖ¼¼Êõ½áºÏµÄ²úÎï.
DHTML±³ºóµÄº¬Òå:
ÀûÓÃHTML°ÑÍøÒ³±ê¼ÇΪ¸÷ÖÖÔªËØ;
ÀûÓÃCSSÉè¼Æ¸÷ÖÖÓйØÔªËصÄÅÅ°æÑùʽ²¢È·¶¨ËüÃÇÔÚ´°¿ÚÖеÄÏÔʾλÖÃ;
ÀûÓÃJavaScriptʵʱµØ²Ù×ݺ͸ıä¸÷ÖÖÓйØÑùʽ.
DOM ÊÇÒ»ÖÖAPI(Ó¦ÓóÌÐò½Ó¿Ú).¼òµ¥µÄ˵,API¾ÍÊÇÒ»×éÒѾµÃµ½Óйظ÷·½¹²Í¬ÈϿɵĻù±¾Ô¼¶¨.
Ïà¹ØÎĵµ£º
JavascriptÖÐ×î³£ÓõÄ55¸ö¾µä¼¼ÇÉ ÊÕ²Ø
1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡ÏûÑ¡È¡¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4 ......
1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡ÏûÑ¡È¡¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return false;" oncut="re ......
±¾ÎÄ·ÇÔ´´
Object.extend = function(destination, source) {
for (var property in source) {
destination[property] = source[property];
}
return destination;
}
Prototype ¶ÔObjectÀའ......
¡¡¡¡´ËÎÄΪ¶Á¡¶JavaScript And DHTML Cookbook¡·ºó×ܽá³öÀ´µÄ±Ê¼Ç¡£ÓÉÓÚµ±Ê±Êdzõѧ£¬ËùÒԱʼÇÖÐÄÑÃâÓдíÎ󣬻¶ÓÖ¸Õý¡£Ð»Ð»£¡
·×Ö·û´®(String)
1.ÉùÃ÷
var myString = new String("Every good boy does fine.");
var myString = "Every good boy does fine.";
&n ......
ÎÒÃÇ¿ÉÒÔʹÓà JavaScript À´´´½¨¶¯Ì¬µÄͼÏñ¡£
ʵÀý
°´Å¥¶¯»
ÀûÓÃÁ½¸ö²»Í¬µÄʼþÀ´Çý¶¯Á½¸öÏàÓ¦µÄº¯Êý£¬À´Çл»Á½ÕŶÔÓ¦µÄͼƬÒÔ´´Ôì³ö¶¯»Ð§¹û¡£
JavaScript ¶¯»
ʹÓà JavaScript ´´½¨¶¯Ì¬Í¼ÏñÊÇ¿ÉÐеġ£
ÇÏÃÅ
ÊÇ£ºÊ¹Óà JavaScript ͨ¹ý²»Í¬µÄʼþÀ´Çл»²»Í¬µÄͼÏñ¡£
ÔÚÏÂÃæµÄÀý×ÓÖУ¬ÎÒÃÇÒªÖÆ×÷Ò»¸ö³äµ±Á ......