本帖最后由 canikin 于 2010-07-21 16:09:47 编辑

解决方案 »

  1.   

    第29行的代码是:
    group.each(function() {
      

  2.   


    group.each(function() {
       thisHeight = $(this).height() || 0;
       if(thisHeight > tallest) {
         tallest = thisHeight;
       }
    }var el = undefined || 1;
    alert(el);//rs = 1
    var el = null|| 1;
    alert(el);//rs = 1
     null|| 1;当元素为null或undefined时,就去后面的1
      

  3.   

    LS那位大虾,小弟实在是菜鸟,对Java一无所知,请问可否直接告知应修改成何种代码为好?多谢了!
      

  4.   

    请问有人可以告知吗?谢谢了
    我把那个代码复制之后,也显示
    var el = undefined || 1;
    这行有语法错误
      

  5.   

    group.each(function() {
       try
       {
       thisHeight = $(this).height() || 0;
       if(thisHeight > tallest) {
         tallest = thisHeight;
       }
       }catch(){throw}
    }
      

  6.   

    谢谢LS的达人不过我修改的时候,提示
       }catch(){throw}这行有语法错误,不知如何解决
      

  7.   

    group.each(function() {
       thisHeight = $(this).height() || 0;
       if(thisHeight > tallest) {
         tallest = thisHeight;
       }
    }
    这个有错,不会吧
      

  8.   


    这样改的话是没有语法错误不过改过之后 'null' 为空或不是对象的错误仍然存在
      

  9.   

    更正一下,此为javascript脚本。。不是java脚本,javascript和java两者完全没关系的,第29行可能还包括头部的一些代码,LZ最好调试下,看到底哪句没拿到对象