摘要:        
方法一、遍历数组var tmp = new Array(1,12,4,124.45,8,99998,456);var max = tmp[0];for(var i=1;i<tmp.length;i++){if(max<tmp[i])max=tmp[i];}方法二、使用apply方法,方法有两个参数,用作 this 的对象和要传递给函数的参数的数组。(http://www.w3school.com.cn/js/pro_js_inheritance_implementing.asp)可以为方法指定调用对象与传入参数,并且可以让传入的参数以数组的形式组织。Math.Max.Apply(M    阅读全文
posted @ 2013-01-19 16:15
远方V3
阅读(44023)
评论(1)
推荐(1)
        

 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号