不支持,要区别的简单办法是在函数名前加统一的标识,例如abc_GetDate();
abc_GetYear();名称最长32个字符

解决方案 »

  1.   

    (function()
    {
    nameSpace = {
    functionName : functionName,
                       functionName2 : functionName2
    };

    function functionName(){
    alert();
    }

    function functionName2(){
    alert();
    }
    }
    )();nameSpace.functionName(); //like c++ namespace, as a static class  
      

  2.   

    我一般是这样:<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title> New Document </title>
    </head><script language="JavaScript">
    var std = {};
    std.alert = function(msg){
        window.alert("This is my alert function : " + msg);
    }function pageOnLoad(){
        alert("这是旧的 alert.");
    std.alert("这是新的 alert.");
    }
    </script><body onload="pageOnLoad()">
    </body>
    </html>
      

  3.   

    leeeel说的是否与 glassprogrammer提的是一回事?
    不太清楚,我再查查资料看。
    在JavaScript 2.0里好像提到过namespace.