本帖最后由 zjleon2008 于 2011-05-15 00:09:05 编辑

解决方案 »

  1.   

    如果不存在document.documentElement.getBoundingClientRect,则直接返回false
    如果存在,返回some code1中function的返回值,
    如果somecode1中返回undefined,返回some code2中function 的返回值
      

  2.   

    &&是逻辑与,||是逻辑或。
    第二四个括号表示立即执行前面的函数。
    return返回的是:
    如果不存在document.documentElement.getBoundingClientRect,则返回some code2中function 的返回值。
    如果存在,则如果some code1中function的返回值可转化为true,则返回其值。
    如果somecode1中返回false,则返回some code2中function 的返回值