js 常用函数收集

来源:互联网 发布:网游编程课程 编辑:程序博客网 时间:2024/05/21 11:08

一. string函数

    1. indexOf     

参考 http://www.w3school.com.cn/jsref/jsref_indexOf.asp

    更多参考: http://www.w3school.com.cn/jsref/jsref_obj_string.asp

二. array函数

    1. concat

    2. slice

    3. $.inArray(value,arr)    jquery查指定的字符串是否在数组中

    4. push

  更多参考: http://www.w3school.com.cn/jsref/jsref_concat_array.asp

5. shift 删除数组元素首个元素,并返回该元素

    

原创粉丝点击