40 ¸öÇáÁ¿¼¶ JavaScript ¿â
Á÷ÐÐµÄ JavaScript ¿â²»Ê¤Ã¶¾Ù£¬jQuery, MooTools, Prototype, Dojo, YUI¡£ÕâЩ JavaScript ¿â¹¦Äܷḻ£¬¼ÓÉÏËüÃǵIJå¼þ£¬¼¸ºõÄÜʤÈÎÈκι¤×÷£¬È»¶øÕâÊÇÓдú¼ÛµÄ£¬ÕâЩ¿âÍùÍùµ¼ÖÂÄãµÄÍøÒ³³ß´çÓ·Öס£ÔÚijЩ³¡ºÏ£¬Èç¹ûÄãÖ»ÏëÍê³ÉÌض¨µÄ¹¤×÷£¬¿ÉÒÔʹÓà һЩ¹¦ÄܸüרһµÄÇáÁ¿¿â£¬±¾ÎĽéÉÜÁË40¸ö·Ç³£³öÉ«µÄÇáÁ¿¼¶ JavaScript ¿â¡£
1. ±íµ¥Ïà¹Ø
wForms
Ò»¸öµÍµ÷µÄ¿ªÔ´ÏîÄ¿£¬¼ò»¯Á˾ø´ó¶àÊý³£Óà JavaScript ±íµ¥¹¦ÄÜ£¬°üº¬¿ÉÒÔÖ±½ÓʹÓÃµÄ±íµ¥ÑéÖ¤¹¦ÄÜ£¬ÁíÍ⣬»¹°üº¬Ç¿´óµÄ±íµ¥Í¬²½ÒÔ¼°±íµ¥Ìõ¼þÅжϹ¦ÄÜ¡£
Validanguage
ÓÖÒ»¸öµÍµ÷µÄ JavaScript ±íµ¥ÑéÖ¤¿ò¼Ü¡£ËüÓµÓм¯³ÉÂß¼£¬Ò»Ð©ÉèÖÿÉÒÔÕë¶ÔÈ«¾Ö£¬µ¥¸ö±íµ¥»òµ¥¸ö¶ÔÏó¡£ÌṩÁ½¸öAPI£¬¼¯³É AJAX Ö§³Ö£¬»º´æ£¬ÒÔ¼°»Øµ÷º¯Êý¡£ËüÌṩÀàËÆ HTML µÄ API Óï¾ä£¬ÒÔ¼°ÃæÏò¶ÔÏóµÄ JavaScript API ¡£
LiveValidation
Ò»¸öÇáÁ¿µÄ±íµ¥ÑéÖ¤¿â¡£³ýÁË´«Í³µÄÑéÖ¤¹¦ÄÜ£¬»¹ÌṩʵʱÑéÖ¤£¬¿ÉÒÔÒ»±ßÊäÈëÒ»±éÑéÖ¤¡£Ruby on Rails Óû§¿ÉÄܻᷢÏÖÕâ¸ö¿â·Ç³£ºÃÓã¬ÒòΪËûÃǵÄÃüÃû¹æÔòºÍ²ÎÊýÊ®·Ö½üËÆ¡£¸Ã¿â¼ÈÓжÀÁ¢°æ±¾£¬ÓÖÓÐÒ»¸ö Prototype °æ±¾¡£
yav
Ò»¸öÇ¿´ó£¬Áé»î£¬¿ÉÀ©Õ¹µÄ±íµ¥ÑéÖ¤¿â¡£Ö§³Ö¸÷ÖÖ³¡ºÏ£¬´Ó¼òµ¥µÄÈçÈÕÆÚ£¬µç×ÓÓʼþµØÖ·ÒÔ¼°ÕûÊýµÄÑéÖ¤£¬µ½¸´Ôӵģ¬ÈçÕýÔò±í´ïʽ¡£ÄÚÖà AJAX Ö§³Ö£¬Êä³öµÄ´íÎóÏûÏ¢¿ÉÒÔ¶¨Î»µ½¶ÔÏ󼶡£
qForms
´¦Àí±íµ¥µÄÕûÌ×·½°¸¡£¹¦ÄÜ°üÀ¨¸÷ÖÖÑéÖ¤¹æÔò£¬·ÀÖ¹¶à´Î·¢²¼µÄ»úÖÆ£¬ÒÔ¼°Ëø¶¨»ò½âËøÖƶ¨ÊäÈë¿ò¡£
formreform
²»»ùÓÚ table µÄ¶àÀ¸Éè¼ÆÏòÀ´ÊÇÒ»¸öÌôÕ½¡£Õâ¸ö΢ÐͿ⽫´«Í³µÄ±íµ¥±ä³ÉƯÁÁµÄ¶àÀ¸ÐÎʽ¡£
2. ¶¯»Ïà¹Ø
$fx()
Ò»¸öÓÃÀ´Èà HTML ¶ÔÏóÔ˶¯µÄÇáÁ¿¿â¡£Äã¿ÉÒÔÔÚÒ»¸öʱ¼äÖáÉϸıäÈκΠCSS ÊôÐÔ£¬¶ÔÓÚ¸´ÔÓ¶¯»£¬Äã¿ÉÒÔ½«¸÷ÖÖЧ¹û½áºÏÆðÀ´£¬½«¶ÔÏó·Ö×飬ÈÃËüÃDz¢ÐÐÔ˶¯¡£
JSTweener
Ò»¸öÉú³ÉÖмäÖ¡µÄ JavaScript ¿â£¬ËüµÄ API ÀàËÆÖøÃûµÄÖмäÖ¡ÒýÇæ Tweener¡£Äã¿ÉÒÔÖ¸¶¨¶¯»Ê±¼ä£¬¶¨ÒåÇл»Ð§¹ûÒÔ¼°Ê±ÑÓ¡£ÔÚ¼¸ºõÈκε㶼¿ÉÒÔ´¥¶¯Ê¼þ¡£
Facebook Animation
Ò»¸öÇ¿´óµÄ£¬ÓÃÀ´´´½¨¿É¶¨ÖƵģ¬»ùÓÚ CSS µÄ¶¯»¡£ÔÚ Facebook ¶¯»ÖУ¬¼¸ÐдúÂë¾Í¿ÉÒÔ¸ÄÉÆ UI¡£Óï·¨ºÍ FBJS £¨ÓÃÓÚ Facebook µÄ¿â£©Ò»Ñù¡£
FX
Ò»¸öÓï·¨ÀàËÆ YUI µÄÇáÁ¿ JavaScript ¿â£¬¿ÉÒÔΪ¼¸ºõÈκΠCSS ÊôÐÔ´´½¨ÖмäÖ¡¡£Ö§³ÖÑÕÉ«ºÍ¹ö¶¯¶¯»£¬Îª¶ÔÏóÉèÖà to ºÍ from Öµ¾Í¿ÉÒÔÁË¡£
3. ÊÓ¾õÓëͼÐÎЧ¹û
JS charts
Ö§³ÖÖù״ͼ£¬Ô²±ýͼÒÔ¼°¼òµ¥µÄÇúÏßͼ¡£Ö±½Ó½«Õâ¸ö¿â²åÈëÍøÒ³£¬È»ºó´Ó XML Îļþ»ò JavaScript Êý×é±äÁ
Ïà¹ØÎĵµ£º
ÓÐÐí¶àСÇÏÃÅÀ´Ê¹±à³Ì¸ü¼ÓÈÝÒס£ÆäÖÐÖ®Ò»¾ÍÊÇeval()º¯Êý£¬Õâ¸öº¯Êý¿ÉÒÔ°ÑÒ»¸ö×Ö·û´®µ±×÷Ò»¸öJavaScript±í´ïʽһÑùÈ¥Ö´ÐÐËü¡£ÒÔÏÂÊÇËüµÄ˵Ã÷
Eval º¯Êý
¹¦ÄÜ£ºÏȽâÊÍJavascript´úÂ룬ȻºóÔÚÖ´ÐÐËü
Ó÷¨£ºEval(codeString)
codeStringÊÇ°üº¬ÓÐJavascriptÓï¾äµÄ×Ö·û´®£¬ÔÚevalÖ®ºóʹÓÃJavascriptÒýÇæ±àÒë¡£
¾Ù¸öСÀý×Ó£º
......
µÚÒ»ÖÖ JavaScriptÁ¬½ÓÊý¾Ý¿â£º
<mce:script language="JavaScript"><!--
// ´´½¨Êý¾Ý¿â¶ÔÏó
var objdbConn = new ActiveXObject("ADODB.Connection");
// DSN×Ö·û´®
var strdsn = "Driver={SQL Server};SERVER=192.168.0.210;UID=xhb;PWD=xhb;DATABASE=books";
// ´ò¿ªÊý¾ÝÔ´
objdbConn.Open(strdsn);
// ......
ÎÄÕ·ÖÀࣺ
JavaScript
ÎÄÕ±êÌ⣺
javascript ×Ö·û´®´¦ÀíÈ«¹¥ÂÔ
¹Ø ¼ü ×Ö£º
0
ÎÄÕÂ×÷Õߣº
alonglee
ÎÄÕÂÀ´Ô´£º
http://lmgq.vip.sina.com/tech/jsadvancedlesson/c2p1.htm
·¢±íʱ¼ä£º
2004-9-21 14:43:00
Ò»¡¢ÉùÃ÷×Ö·û´®:
var normal_monkey = "I&n ......
JavaScriptÖÐÓÐËÄÖÖ²»Í¬ÀàÐ͵ÄÑ»·£¬forÑ»·¡¢do-whileÑ»·ºÍwhileÑ»·¡££¨µÚËÄÖÖÀàÐÍΪfor-inÑ»·£¬ÓÃÓÚµü´ú¶ÔÏóµÄÊôÐÔ£¬±¾ÎIJ»ÓèÌÖÂÛ¡££©´úÂëÈçÏ£º
var values = [1, 2, 3, 4, 5];
//for Ñ»·
for(var i=0; i<values.length; i++){
process(values[i]);
}
//do-while Ñ»·
var j=0;
do{
process(values[j++] ......
document.close();
document.open();
function jsonFormat(template, json) {
return template.replace(/\$\{(.+?)\}/g, function ($, $1) {
return json[$1];
});
}
var links = [
{ text: "ÈËÈâËÑË÷", url: "http://renrousousuo.com" } ,
{ text: "CSDN", url: &qu ......