不会,还是整型和布尔型,传字符串要加"",如fn1("12345","true");这样他们就变字符串了

解决方案 »

  1.   

    学习
    true是Javascript保留所以不会当成字符串
      

  2.   

    Javascript保留字列表:
    break delete function return typeof 
    case do if switch var 
    catch else in this void 
    continue false instanceof throw while 
    debugger finally new true with 
    default for null try   
      

  3.   

    在javascrpit里面函数里面传递参数,使用的是形参,不是其他语言里面的可以传递地址来使用;形参在函数调用过程中不会被改变的;
      

  4.   

    楼主可以试试:
    fn1(12345,true);
    function fn1(agr1,arg2)
    {
       alert("arg1 type is: "typeof arg1);
       alert("arg2 type is: "typeof arg2);
    }