Home  >  Article  >  Web Front-end  >  jQuery中map()方法用法实例_jquery

jQuery中map()方法用法实例_jquery

WBOY
WBOYOriginal
2016-05-16 16:21:511021browse

本文实例讲述了jQuery中map()方法用法。分享给大家供大家参考。具体分析如下:

此方法将一组元素转换成其他数组(不论是否是元素数组)。
可以用这个函数来建立一个列表,不论是值、属性还是CSS样式,或者其他特别形式。
语法结构:

复制代码 代码如下:
$("selector").map(function)

参数列表:

参数 描述
function 给每个元素执行的函数

实例代码:

复制代码 代码如下:






脚本之家





 

值:


 

   
   
   
 




希望本文所述对大家的jQuery程序设计有所帮助。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn