jquery当中grep怎么用?

例 2.3

<html>
<head>
<script language="javascript" src="jquery.min.js"></script>
<script language="javascript">
var aAr = [1, 9, 5, 6, 3];
var aRe = $.grep(aAr,function(value,index){
    return (value > 5 && index > 2);
});
document.write("aAr: " + aAr + "<br>");
document.write("aRe: " + aRe);
</script>
</head>
<body>
</body>
</html>

更多内容请见原文,文章转载自:https://blog.csdn.net/qq_44594371/article/details/103062915

上一篇:20202328 2021-2022-1 《数据结构与面向对象程序设计》实验三报告


下一篇:【Tools】VS搭建Qt开发环境