if(document.all.(ObjectName))返回false or true

解决方案 »

  1.   

    if (myObj)if (myObj != null)if (myObj != "undefined")
      

  2.   

    javascript是没有null这个对象的。
    这个问题我用另一种解决了,现在发现 本人提问纯粹浪费分数,不到一会就能自己想出来。不过 adamcn(adamcn)的方法也是对的。thanks!
      

  3.   

    if (myObj != null)   //不存在if (typeOf(myObj) != "undefined")  //不存在
      

  4.   

    treeClimber(is)你应该看看提问的智慧一文
    http://alfredy.myetang.com/
      

  5.   

    对不起treeClimber(is),刚才我写反了,两个判断都是表示存在的
      

  6.   

    还有谁在说有null?自己试过没有?
      

  7.   

    晕倒
    没有看书就用,用也就算了,还大言不惭JScript  Language Reference --------------------------------------------------------------------------------JScript Data Types
    In JScript, there are three primary data types, two composite data types, and two special data types.The primary (primitive) data types are: String 
    Number 
    Boolean 
    The composite (reference) data types are: Object 
    Array 
    The special data types are: Null 
    Undefined 
      

  8.   

    null在js中不是一个独立的对象,和true/false/undefined/NaN一样属于常数
      

  9.   

    silentlamb(silent) 同志说的对,NUll它只是datatype,把它拥在判断对象上绝对行不通的。我自己已经试过了。
    感谢 wsj(骆驼) 为我们取证!
    由于分数关系,我只能对前面几位给分了,很抱歉!