随笔分类 -  js

工作中总结
摘要:parent.$.find("iframe")[0].contentWindow.getvalue(); h.find("iframe")[0].contentWindow.document.getElementById("tt").value; 阅读全文
posted @ 2014-04-02 12:01 @索卡 阅读(224) 评论(0) 推荐(0)
摘要:View Code function upperMoneys(num) { debugger; var strOutput = ""; var strUnit = '仟佰拾亿仟佰拾万仟佰拾元角分'; num += "00"; var intPos = num.indexOf('.'); if (intPos >= 0) { num = num.substring(0, intPos) + num.substr(intPos + 1, 2); } strUnit = strUnit.substr(strUnit.len 阅读全文
posted @ 2013-01-08 11:34 @索卡 阅读(211) 评论(0) 推荐(0)
摘要:在函数体内,标识符arguments是指向实参对象的应用,实参对象是一个数组对象 ,这样就可以通过数字下标访问传入函数的实参值, 演示arguments 的用法View Code //查找最大值 function maxs() { var _max=Number.NEGATIVE_INFINITY; //负无穷大,溢出时返回该值 //遍历实参,查找并记录最大值 for(var i=0;i<arguments.length;i++) { if(arguments[i]>_max) { ... 阅读全文
posted @ 2012-12-02 20:31 @索卡 阅读(267) 评论(0) 推荐(0)