JScript  Language Reference --------------------------------------------------------------------------------Logical OR Operator (||)
Performs a logical disjunction on two expressions.result = expression1 || expression2Arguments
resultAny variable.expression1Any expression.expression2Any expression. Res
If either or both expressions evaluate to True, result is True. The following table illustrates how result is determined:If expression1 is And expression2 is The result is 
True True True 
True False True 
False True True 
False False False 
JScript uses the following rules for converting non-Boolean values to Boolean values: All objects are considered true. 
Strings are considered false if and only if they are empty. 
null and undefined are considered false. 
Numbers are false if, and only if, they are 0. 
Requirements
Version 1

解决方案 »

  1.   

    JScript  Language Reference --------------------------------------------------------------------------------Logical AND Operator (&&)
    Performs a logical conjunction on two expressions.result = expression1 && expression2 Arguments
    resultAny variable.expression1Any expression.expression2Any expression. Res
    If, and only if, both expressions evaluate to True, result is True. If either expression evaluates to False, result is False. JScript uses the following rules for converting non-Boolean values to Boolean values: All objects are considered true. 
    Strings are considered false if, and only if, they are empty. 
    null and undefined are considered false. 
    Numbers are false if, and only if, they are zero. 
    Requirements
    Version 1 
      

  2.   

    wsj(骆驼), 谢谢你的回答!
    我想问的是整个表达式的意思?这么说吧!
    如果bw.ie,document.body.offsetWidth-20存在,innerWidth不存在,
    那么X的返回值是谁?当然,你一试就知道!我不明白的是结果是怎么的出来的?
      

  3.   

    执行先后为not and or
    <script>
    x = 0 && 100||1||10; 
    alert(x);
    </script>