javascriptÖеÄwith
with(document)
{
write ("test");
write
("dsasfda");
}
ÉÏÃæÊÇÓÃÁËwith
Èç¹û²»Óõϰ¾ÍÒªÕâÑùдÁË
document.write ("test")
document.write ("dsasfda");
Ê¡µôÁ˲»ÉٵĴúÂëÓ´
Ïà¹ØÎĵµ£º
Dojo
Ò»¸öÇ¿´óµÄÃæÏò¶ÔÏójavascript¿ò¼Ü¡£
Ö÷ÒªÓÉÈý´óÄ£¿é×é³É£ºCore¡¢Dijit¡¢DojoX¡£
CoreÌṩ Ajax£¬events£¬packaging£¬CSS-based querying£¬animations£¬JSONµÈÏà¹Ø²Ù×÷API¡£
Dijit ......
Êý×éÓÐËÄÖÖ¶¨ÒåµÄ·½Ê½
ʹÓù¹Ô캯Êý£º
var a = new Array();
var b = new Array(8);
var c =
new Array("first", "second", "third");
»òÕßÊý×éÖ±½ÓÁ¿£º
var d = ["first",
"second", "third"];
ÊôÐÔ
ArrayÖ»ÓÐÒ»¸öÊôÐÔ£¬¾ÍÊÇlength£¬length±íʾµ ......
1. Ò»ÖÖÃæÏò¶ÔÏóÓïÑÔÐèÒª¿ª·¢ÕßÌṩÒÔÏÂËÄÖÖ»ù±¾ÄÜÁ¦¡£
£¨1£©·â×°---°ÑÏà¹ØÐÅÏ¢£¨ÎÞÂÛÊôÐÔ»¹ÊÇ·½·¨£©´æ´¢ÔÚ¶ÔÏóÖеÄÄÜÁ¦¡£
£¨2£©¾Û¼¯---°ÑÒ»¸ö¶ÔÏó´æ´¢ÔÚÁíÒ»¸ö¶ÔÏóÄÚµÄÄÜÁ¦¡£
£¨3£©¼Ì³Ð---ÓÉÁíÒ»¸öÀࣨ»ò¶à¸öÀࣩµÃÀ´ÀàµÄÊôÐÔ»ò·½·¨µÄÄÜÁ¦¡£
£¨4£©¶à̬---±àдÄÜÒÔ¶àÖÖ·½·¨ÔËÐеĺ¯Êý»ò·½·¨µÄÄÜÁ¦¡£
2. °Ñ¶ÔÏóµÄËù ......
ÔÚ¿´ÁËW3CµÄ¹ØÓÚECMScriptµÄ¶ÔÏ󼰼̳кó£¬ÏÈÊÇÍê³Ḛ́³ÔÉßµÄʵÏÖ¡£×î½üÓÖ³é¿ÕʵÏÖÁË϶íÂÞ˹·½¿é¡£¶ÔÓÚ¶íÂÞ˹·½¿éÖØÒªµÄ²»ÊÇÓÎÏ·±¾Éí£¬¶øÊÇÔÚÕâ¸ö¹ý³ÌÖжÔÓÚjavascript¼Ì³ÐµÄʹÓá£
µ±È»ÔÚһЩ¶ÔÏóµÄ»®·Ö¼°Ê¹Óùý³Ì»¹´æÔÚ覴ã¬Ëã·¨Ò²²»Ëã×îÓÅ£¬·¢²¼³öÔ´ÂëÖ»ÊÇÏë×ö¸ö½»Á÷¡£ÒÔϾÍÌṩԴ´úÂ빩´ó¼Ò²Î¿¼£¬Ò²Îª×Ô¼º×ö¸ö±¸·Ý¡£ ......
Á˽âÒ»ÏÂÀàµÄ¸ÅÄJavaScript ±¾ÉíÊÇÒ»ÖÖÃæÏò¶ÔÏóµÄÓïÑÔ£¬ËüËùÉæ¼°µÄÔªËØ¸ù¾ÝÆäÊôÐԵIJ»Í¬¶¼ÒÀ¸½ÓÚijһ¸öÌØ¶¨µÄÀà¡£
ÎÒÃÇËù³£¼ûµÄÀà°üÀ¨£ºÊý×é±äÁ¿(Array)¡¢Âß¼±äÁ¿(Boolean)¡¢ÈÕÆÚ±äÁ¿(Date)¡¢½á¹¹±äÁ¿(Function)¡¢ÊýÖµ±äÁ¿(Number)¡¢¶ÔÏó±äÁ¿(Object)¡¢×Ö·û´®±äÁ¿(String) µÈ£¬¶øÏà¹ØµÄÀàµÄ·½·¨£¬Ò²ÊdzÌÐòÔ±¾³£Óõ½µÄ ......