12¸öjavascript ¿âÍâÁ´
Ê×ÏÈÊÇÊ®¸öJS FRAMEWORK
jquery
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
jquery UI
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script>
Chrome Frame
<script src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/CFInstall.min.js"></script>
swfobject
<script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
mootools
<script src="http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools-yui-compressed.js"></script>
Yahoo! UI
<script src="http://ajax.googleapis.com/ajax/libs/yui/2.8.1/build/yuiloader/yuiloader-min.js"></script>
Prototype
<script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js"></script>
Ext.JS
<script src="http://ajax.googleapis.com/ajax/libs/ext-core/3.1.0/ext-core.js"></script>
Dojo
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.4.3/dojo/dojo.xd.js"></script>
Scriptaculous
<script src="http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.3/scriptaculous.js"></script>
½ÓÏÂÀ´£¬ÓÐÒ»¸öÕë¶ÔIE6µÄÓѺÃÌáʾ£¨¸ÃËÀµÄIE6,ÈËÈ˵öøÖïÖ®£©
<!--[if lte IE 6]>
<mce:script src="http://letskillie6.googlecode.com/svn/trunk/letskillie6.zh_CN.pack.js" mce_src="http://letskillie6.googlecode.com/svn/trunk/letskillie6.zh_CN.pack.js"></mce:script>
<![endif]-->
Õâ¸öÒª·ÅÔÚÒ³Ãæ×îµÍ¶Ë¡£
×îºóÒ»¸öÊÇÔÚÍøÒ³ÀïǶÈëFIREBUGµ÷ÊÔÆ÷¡£
<script
type
=
'text/javascript'
src
=
'
http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js
'
></
script
>
Ïà¹ØÎĵµ£º
±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔÀ´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷ÔÒò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......
//the common event,If your brower is firefox,you should use this function instead of "window.event"
function getEvent() {
if(document.all)
return window.event; //get ie event
func=getEvent.caller;
while(func!=null) {
......
ÕâÆª¿ªÊ¼»á·ÖÎöÁ÷ÐеÄjs¿â֮дÀ෽ʽ¡£¸÷ÖÖ¿âµÄдÀ෽ʽËäÈ»Ç§Ææ°Ù¹Ö£¬µ«ÈÔÈ»ÌÓÀë²»Á˱¾ÖÊ---Óù¹Ô캯ÊýºÍÔÐÍ
À´×é×°Àà¡£
6¡¢Prototype.jsµÄдÀ෽ʽ
//prototype.jsÖеĴúÂë
var Class = {
create: function() {
return function() {
this.initialize.apply(this, arguments);
}
}
}
//¼ò»¯ ......
8¡¢Ext.jsµÄдÀ෽ʽ
ÕâÀïÓõÄÊÇExt core3.0£¬ExtÖÐÓÃExt.extendÀ´¶¨ÒåÒ»¸öÀࣨµ±È»Ëü¸ü¶àÓÃÀ´À©Õ¹Ò»¸öÀࣩ£¬ExtÕû¸ö¿ò¼Ü¸÷ÖֿؼþÈçPanel£¬MessageBoxµÈ¶¼ÊÇÓÃExt.extend·½·¨À´À©Õ¹¡£ÕâÀï½ö½öÓÃËüÀ´¶¨ÒåÒ»¸ö×î¼òµ¥µÄÀà¡£
¿´Ext.extendµÄ´úÂë¿ÉµÃÖª£¬ËüÈÔÈ»ÊÇÓù¹Ô캯ÊýºÍÔÐÍÀ´×é×°Ò»¸öÀà¡£
ÕâÀïÖ»Ðè´«Á½¸ö²ÎÊý¼´¿É£¬µÚÒ ......
Do you want an ultra fast web site? Get JSL and optimize your JavaScript loading now!
Imagine there's a 4-lane highway between your web browser and the internet itself. This highway is optimize to let pictures, text, and css fly by. But, when it comes to external scripts, the highway crea ......