上一页 1 ··· 4 5 6 7 8
摘要: HTML:<h3>对象数组显示</h3><table id="obj" border="1"> </table>jquery:var animals = [ { 'name':'dog', 'mouse':'wangwang..' }, { 'name':'cat', 'mous... 阅读全文
posted @ 2012-08-21 09:25 蚊子吃青蛙 阅读(10405) 评论(0) 推荐(0) 编辑
摘要: HTML: <h3>原始数组</h3> <div id="show5"></div> <h3>原数组的一部分</h3> <div id="show6"></div> <h3>原数组的剩下一部分</h3> <div id="show7"></div>Jquery:var animals = ['dog','cat','tiger','pig 阅读全文
posted @ 2012-08-21 09:10 蚊子吃青蛙 阅读(11709) 评论(0) 推荐(0) 编辑
摘要: HTML:View Code 1 <h3>字符串数组排序前</h3>2 <div id="show5"></div>3 <h3>排序后</h3>4 <div id="show6"></div>jquery:View Code var animals = ['dog','cat','tiger','pig','bird'];$('#show5').html(anima 阅读全文
posted @ 2012-08-21 08:53 蚊子吃青蛙 阅读(47136) 评论(3) 推荐(1) 编辑
摘要: HTML:<h3>原始显示</h3><div id="show5"></div><h3>应用grep()方法后(1)</h3><div id="show6"></div><h3>应用grep()方法后(2)</h3><div id="show7"></div>jquery:var animals = ['dog','cat','tiger',&# 阅读全文
posted @ 2012-08-20 17:39 蚊子吃青蛙 阅读(6125) 评论(0) 推荐(0) 编辑
摘要: HTML:<h3>数组map方法</h3><div id="show4"></div>jquery:$(document).ready(function(){ var animals = ['dog','cat','tiger','pig','bird']; animals = $.map(animals, function(n,i){ return i+'.This is '+n; ... 阅读全文
posted @ 2012-08-20 17:09 蚊子吃青蛙 阅读(2406) 评论(0) 推荐(0) 编辑
摘要: HTML代码:<h3>纵向显示数组</h3><div id="show1"></div><h3>显示数组的键名和键值</h3><div id="show2"></div><h3>利用html元素创建数组并计算长度</h3><div id="show3"></div>Jquery:$(document).ready(function(){ var animals = ['dog' 阅读全文
posted @ 2012-08-20 16:46 蚊子吃青蛙 阅读(3477) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8