1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <title></title>
5 <script src="../Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
6 <script type="text/javascript">
7 $(document).ready(function () {
8 alert("read只要对象加载完毕即触发、不要需要等待实例完毕");
9 });
10 $(function () {
11 alert("而且可以重复绑定、还有简写方法、");
12 });
13
14 var arr1 = [1, 3, 5, 7, 9];
15 var arr2 = $.map(arr1, function (item) {
16 return item * 2;
17 });
18
19 alert("map方法例子:\narr1:" + arr1 + "\narr2:" + arr2);
20 alert("echo方法同map、只是无返回值");
21 </script>
22 </head>
23 <body>
24
25 </body>
26 </html>