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

javascriptµÄdomReady

»ù±¾ÉÏÿ¸ö¿â¶¼ÓÐÕⶫÎ÷£¬ÒòΪÈç¹ûÒª¶ÔÒ³ÃæÉϵÄÔªËؽøÐвÙ×÷£¬ÎÒÃDZØÐëµÈµ½Ò³Ãæ¼ÓÔØÁËÕâ¸öÔªËزÅÐУ¬·ñÔò»á±¨´í£¬µ«ÊÇÎÒÃǺÜÄÜÅж¨Ä³¸öÔªËØÊÇ·ñÒѼÓÔØ£¬µ«ÎÒÃÇ¿ÉÒÔÅж¨Ò³ÃæÊÇ·ñ¼ÓÔØ£¬Õâ¾ÍÊÇÎÒÃǾ­³£°Ñ´úÂë·Åµ½window.onload = function(){}Ö®ÖеÄÔµÓÉ¡£µ«window.onloadʼþÊÇ´ýµ½Ò³ÃæÉϵÄËùÓÐ×ÊÔ´±»¼ÓÔزż¤»î£¬Èç¹ûÒ³ÃæÉÏÓÐÐí¶àͼƬ£¬ÒôÀÖ»òfalsh£¬¶øÎÒÃÇÒª²Ù×÷µÄÔªËØÔÚµÄËüÃǵÄÏ·½ÄØ£¿Òò´Ë£¬W3C×öÁËÉÙÓм¸×®ºÃÊ£¬¸ãÁËDOMContentLoadedÓëaddEventListener£¬¿ÉÄÜÒ²²»ÊÇËûÃǸãµÄ£¬°Ñijä¯ÀÀÆ÷µÄ˽ÓÐʵÏÖ¸ÇÉϸö´óÓ¡£¬±êÃ÷ËüÊDZê×¼°ÕÁË£¬ÈçsafariµÄcanvas£¬IEµÄgetBoundingClientRect¡­¡­DOMContentLoadedÊÇDOMÊ÷Íê³Éʱ¼¤»îµÄʼþ£¬addEventListenerÖ§³Ö¶àÖؼÓÔØÓëðÅݲ¶»ñ¡£IEûÓÐÕⶫÎ÷£¬ÎÒÔÚ¡¶javascriptµÄʼþ¼ÓÔØ¡·»ù±¾¸ø³öËüµÄ³ûÐÎÁË£¨×¢£º×òÌìÖØдÁ˸ÃÎÄ£©£¬±¾ÎĽ«ÔÚËüµÄ»ù´¡ÉϽøÐнøÒ»²½µÄ·â×°Óë¸Ä½ø£¬ÈçsetTimeout¸ÄΪÁãÃëÑÓ³Ù£¬Çå³ýsetTimeout£¬Ö´ÐÐÍê¼ÓÔغó°Ñ¼ÓÔغ¯ÊýÇå³ýµô£¬¶ÔIE¿ò¼Ü½á¹¹µÄÒ³Ãæ½øÐиü°²È«µÄÉèÖá­¡­×îÖØÒªµÄÊÇÐÞÕýÏÂÃæÍøÓÑ wbkt2t Ìáµ½µÄÔÚIEÖеÄʧÎó£¡
(function(){
dom = [];
var timer;
dom.isReady = false
dom.isFunction = function(obj){
return Object.prototype.toString.call(obj) === "[object Function]";
}
dom.Ready = function(handler){
dom.pollReady(); //Èç¹ûûÓн¨³ÉDOMÊ÷£¬Ôò×ßµÚ¶þ²½£¬´æ´¢ÆðÀ´Ò»Æðɱ
if(dom.isReady){
handler()//Èç¹ûÒѾ­½¨³ÉDOM£¬ÔòÀ´Ò»¸öɱһ¸ö
}else{
if(dom.isFunction(handler)){
dom.push(handler);//´æ´¢¼ÓÔØʼþ
}
}
};
// doScrollÕâ¸öΰ´óµÄhackÓÉÅ£ÈËDiego Perini·¢¾ò³öÀ´
// http://javascript.nwbox.com/IEContentLoaded/
dom.fire = function(){//Ö´ÐÐDOMÊ÷ûÓн¨³ÉÇ°¼ÓÔصÄʼþ
if (!dom.isReady )
dom.isReady = true;
for (var i=0,length = dom.length; i<length; i++) {
var handler = dom[i];
handler.call(window);
}
if (timer) window.clearTimeout(timer);
dom.length = 0;//Çå¿Õ
};
dom.pollReady = function()


Ïà¹ØÎĵµ£º

JavaScript³£Óõĺ¯Êý

      javascriptÌṩÁËÐí¶àº¯Êý¹©¿ª·¢ÈËԱʹÓã¬ÏÂÃæ¸ø³öÒ»¸ö¼òµ¥½éÉÜ£¬¸üÏêϸµÄÐÅÏ¢Çë²Î¿¼Visual InterDevÌṩµÄÔÚÏß°ïÖú¡£
¡¡¡¡javascriptº¯ÊýÒ»¹²¿É·ÖΪÎåÀࣺ
¡¡¡¡·³£¹æº¯Êý
¡¡¡¡·Êý×麯Êý
¡¡¡¡·ÈÕÆÚº¯Êý
¡¡¡¡·Êýѧº¯Êý
¡¡¡¡·×Ö·û´®º¯Êý
¡ ......

JavaScriptÌØЧ£º¼ä¸ô¹ö¶¯Í¼Æ¬

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>¼ä¸ô¹ö¶¯Í¼Æ¬</title>
<meta http-equiv= ......

JavaScriptÓëC#Ö®¼äº¯ÊýÓë±äÁ¿µÄÏ໥µ÷Óã¨×ª£©

ÎÊ£º
1.ÈçºÎÔÚJavaScript·ÃÎÊC#º¯Êý?
2.ÈçºÎÔÚJavaScript·ÃÎÊC#±äÁ¿?
3.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptµÄÒÑÓбäÁ¿?
4.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptº¯Êý?
 
ÎÊÌâ1´ð°¸ÈçÏ£º
javaScriptº¯ÊýÖÐÖ´ÐÐC#´úÂëÖеĺ¯Êý£º
·½·¨Ò»£º1¡¢Ê×ÏȽ¨Á¢Ò»¸ö°´Å¥£¬ÔÚºǫ́½«µ÷Óûò´¦ÀíµÄÄÚÈÝдÈëbutton_clickÖÐ;
  &n ......

javascript table²Ù×÷Àà

/************** javascript table²Ù×÷Àà***************
* ½öÊʺÏIE6
****µ÷ÓÃʾÀý*****************************************
*
* var table=new TableOption("tb");
*
* var table=new TableOptions("tb",{hoverColor:#aabbcc,hover:false});
*
*****************************************************/
var $= ......

javascriptʵÏÖÁÄÌì´°¿Ú¹ö¶¯Ìõ×ÜÔÚ×îÏÂÃæµÄ·½·¨

<html>
<head>
<title>javascriptʵÏÖÁÄÌì´°¿Ú¹ö¶¯Ìõ×ÜÔÚ×îÏÂÃæµÄ·½·¨</title>
<script language="javascript">
    function addMessage(message){
        var chatArea=document.getElementById("chatArea");
&n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ