摘要: 此种功能 我已经搞了两天 才测试出最有效的方法 当然 还是靠百度的帮助下面来介绍一下把function xianc(did){var DateUrl = "did="+did;$.ajax({type: "get",url: "do.php?ac=demo&op=friend",data: DateUrl, dataType: "json",success: function(response){eo=$('#t_input');var re=new RegExp("^" 阅读全文
posted @ 2013-07-31 13:01 tested 阅读(617) 评论(0) 推荐(0) 编辑
摘要: 定义和用法push() 方法可向数组的末尾添加一个或多个元素,并返回新的长度。语法arrayObject.push(newelement1,newelement2,....,newelementX)参数描述newelement1必需。要添加到数组的第一个元素。newelement2可选。要添加到数组的第二个元素。newelementX可选。可添加多个元素。返回值把指定的值添加到数组后的新长度。说明push() 方法可把它的参数顺序添加到 arrayObject 的尾部。它直接修改 arrayObject,而不是创建一个新的数组。push() 方法和 pop() 方法使用数组提供的先进后出栈的功 阅读全文
posted @ 2013-07-31 12:03 tested 阅读(497) 评论(0) 推荐(0) 编辑
摘要: JS中split用法JS删除数组元素var arr=[’a',’b',’c'];若要删除其中的’b',有两种方法:1.delete方法:delete arr[1]这种方式数组长度不变,此时arr[1]变为undefined了,但是也有好处原来数组的索引也保持不变,此时要遍历数组元素可以才用for(index in arr)document.write(’arr[’+index+’]=’+arr[index]);这种遍历方式跳过其中undefined的元素* 该方式IE4.o以后都支持了2.数组对象splice方法:arr.splice(1,1);这种方式数组长度 阅读全文
posted @ 2013-07-31 12:02 tested 阅读(540) 评论(0) 推荐(0) 编辑