Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Javascript DOMѧϰ±Ê¼Ç1


·µ»ØÒ»¸ö¸ø¶¨idÊôÐÔÖµµÄÔªËؽڵãµÄ¶ÔÏó
document.getElememtById(id) 
·µ»ØÒ»¸ö°üº¬ËùÓиø¶¨±êÇ©µÄÔªËصÄÊý×é 
document.getElementsByName(tag)
»ñÈ¡ÔªËØÊôÐÔ
document.getAttribute(attribute)
ÉèÖÃÔªËØÊôÐÔÖµ
document.setAttribute(attribute)


Ïà¹ØÎĵµ£º

javascript splitµÄÓ÷¨

ÓÐʱºò½øÐÐajax½»»¥µÄʱºò£¬·µ»ØµÄÊý¾Ý¿ÉÒÔ×Ô¼ºÌí¼Ó·Ö¸ô·û£¬±ÈÈç^^^£¬È»ºó¶ÔÕâЩ·Ö¸ô·û½øÐнâÎö£¬·Ö½âΪһ¸öÊý×é¡£
function fill(v) {
if (v == undefined)return false;
var result = v.split("^^^");
$("#cnPatent").val(result[0]);
$("#cnPText").val(result[1]); ......

ѧϰ¡¶JavaScript¸ß¼¶³ÌÐòÉè¼Æ¡·Ñ§Ï°±Ê¼Ç£¨¶þ£©

Ò»¡¢deleteÔËËã·ûɾ³ý¶ÔÒÔÇ°¶¨ÒåµÄ¶ÔÏóÊôÐÔ»ò·½·¨µÄÒýÓãº
    var o=new Object();
    o.name="hello";
    alert(o.name);    //Êä³ö“hello”
    delete o.name£»
    alert(o.name);   //Êä³ö& ......

javascriptʵÏÖµ¯³ö´ø͸Ã÷Ч¹ûµÄ¿ÉÍ϶¯Í¼²ã

  javascriptʵÏÖµ¯³ö´ø͸Ã÷Ч¹ûµÄ¿ÉÍ϶¯Í¼²ã
      ×î¾­ÒòΪÐèÒªÒ»¸öµ¯³öͼ²ãЧ¹û£¬µ¯³öͼ²ãµ¹ÊÇÈÝÒ×ʵÏÖ£¬µ«¾ßÓÐÍ϶¯Ð§¹ûÈ´²»ÖªÔõôȥʵÏÖ£¬ÔÚÍøÉÏ×îÖÕÕÒµ½ÁËÒ»¸öÐèÒªµÄЧ¹û£¬´úÂëÒ²²»¶à£¬Ò»¿´´úÂëµÄ¾«Á¶£¬ÖªµÀÔ­×÷ÕßÓ¦¸ÃÊÇjavascript¸ßÊÖ¼¶±ðµÄÈË£¬ÏÖÔÚ¾ö¶¨½èÀ´Ò»Óã¬ÎÒ°ÑËüÂÔ¼ÓÃÀ» ......

Javascriptѧϰ±Ê¼ÇÒ» ¶ÔÏó

 ¼ìË÷:
1 ÓÃ||À´Ìî³äĬÈÏÖµ
var status = flight.status || "unknown";
2 ʹÓÃ&&·ÀÖ¹TypeError
flight.equipment.model //throw "TypeError"
flight.equipment && flight.equipment.model //undefined

ÒýÓÃ
var a={},b={},c={};
document.writeln(a===b); //false
Ô­ÐÍ
Javascript ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ