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

javascriptÔÚÏ߱༭Æ÷´úÂë

 
// =========================================================
var XEDITOR_STATUS_NOTLOADED = 0;
var XEDITOR_STATUS_ACTIVE = 1;
var XEDITOR_STATUS_COMPLETE = 2;
var XEDITOR_TRISTATE_OFF = 0;
var XEDITOR_TRISTATE_ON = 1;
var XEDITOR_TRISTATE_DISABLED = -1;
var XEDITOR_UNKNOWN = -9;
var XEDITOR_Active=0;
var ColorElement;
var SelectedIndex;
String.prototype.Contains = function(A){return (this.indexOf(A)>-1);};
var strBrowserInfo = navigator.userAgent.toLowerCase();
var XBrowserInfo = {
    IsIE:strBrowserInfo.Contains('msie'),
    IsIE7:strBrowserInfo.Contains('msie 7'),
    IsGecko:strBrowserInfo.Contains('gecko/'),
    IsSafari:strBrowserInfo.Contains('safari'),
    IsOpera:strBrowserInfo.Contains('opera')
};
XBrowserInfo.IsGeckoLike = XBrowserInfo.IsGecko||XBrowserInfo.IsSafari||XBrowserInfo.IsOpera;
var XSelection = new Object();
XSelection.GetType=function()
{
    if(XBrowserInfo.IsGeckoLike){
        selectionType = 'Text';
        var A;
        try {
            A = window.WinEditor.getSelection();
        }catch (e) {};
        if (A&&A.rangeCount==1){
            var B=A.getRangeAt(0);
            if (B.startContainer==B.endContainer&&(B.endOffset-B.startOffset)==1&&B.startContainer.nodeType!=Node.TEXT_NODE)
                selectionType='Control';
        };
        return selectionType;
    }else{
        return window.DocEditor.selection.type;
 &nbs


Ïà¹ØÎĵµ£º

javascriptÈçºÎ¶¨ÒåÀà

javascriptÈçºÎ¶¨ÒåÀàÄØ£¿
ÃæÊÔµÄʱºòÓÐѧÉú±»Îʵ½Õâ¸öÎÊÌâ¡£
ʵ¼ÊÉÏjavascriptµÄ·½·¨¾ÍÊÇÒ»¸ö¶ÔÏó¡£
ÀûÓÃÕâÒ»µã£¬ÎÒÃÇ¿ÉÒÔʹÓÃjavascript¶¨ÒåÀà¡£
ÈçÏÂÀý×ÓËùʾ¡£
<mce:script language="javascript"><!--
//javascriptµÄÃæÏò¶ÔÏóµÄÀý×Ó
function sayHi(){
alert("Hello ,"+this.name);
}
function get ......

javascript ÖÐcallÓëapplyÇø±ð

1.call·½·¨
¹Ù·½£¨JavaScriptÊֲᣩ£º
µ÷ÓÃÒ»¸ö¶ÔÏóµÄÒ»¸ö·½·¨£¬ÒÔÁíÒ»¸ö¶ÔÏóÌæ»»µ±Ç°¶ÔÏó¡£
call([thisObj[,arg1[,
arg2[,   [,.argN]]]]])
²ÎÊý
thisObj  ¿ÉÑ¡Ïî¡£½«±»ÓÃ×÷µ±Ç°¶ÔÏóµÄ¶ÔÏó¡£
arg1, arg2,  , argN
¿ÉÑ¡Ïî¡£½«±»´«µÝ·½·¨²ÎÊýÐòÁС£
  
˵Ã÷
call ·½·¨¿ÉÒÔÓÃÀ´´ú ......

JavaScript ʱ¼ä¼Ó¼õ ¸Ä±ä

JavaScript ʱ¼ä¼Ó¼õ:
<HTML>
<BODY>
    <script type="text/javascript">
        var time = new Date("04/30/2010");
        document.write(time);
        ......

javascriptЧÂʾ­Ñé̸(Ò»)

±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔ­À´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾­Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾­¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷Ô­Òò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......

javascript ¿ØÖÆ htmlÔªËØ ÏÔʾ/Òþ²Ø

javascript ¿ØÖÆ htmlÔªËØ ÏÔʾ/Òþ²Ø
1¡£±àдjsº¯Êý
 <script type="text/javascript">
function display(y){$(y).style.display=($(y).style.display=="none")?"":"none";}
function $(s){return document.getElementById(s);}
 </script>
2. ÒªÏÔÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ