11 2015 档案
JavaScript对象遍历
摘要:一、对象是数组: var arr = [9, 8, 7, 6, 5, 4, 3, 2, 1]; //each遍历: .each(arr,function
js字符串 数组处理
摘要:/*字符串处理*/ var a="Hello world!" console.log(a.indexOf("e")) //1 l的index 不存在-1 lastIndexOf() console.log(a.search("w")) //6 l的index 不存在-1 查找 console.log
JSON与JSONP
摘要:JSON和JSONP JSON(JavaScript Object Notation)和JSONP(JSON withPadding)虽然只有一个字母的差别,但其实他们根本不是一回事: JSON是一种数据交换格式,而JSONP是一种非官方跨域数据交互协议。 我们拿谍战片来打个比方,JSON是地下党们