jQuery 抄袭笔记(22) :split()
23 Oct 2011这首Matador曾经给我无数个安谧的夜晚。
01 <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
02 <html xmlns=“http://www.w3.org/1999/xhtml”>
03 </span>
04 <meta http-equiv=“Content-Type” content=“text/html; charset=gb2312″ />
05</span>Hello Lazynight~~</title>
06 <script type=“text/javascript” src=“jquery-1.1.3.pack.js”></script>
07 <script type=“text/javascript”>
08 $(document).ready(function(){
09 $(“input[@value=点我测试~~]“).click(function(){
10 alert($(“#lazynight”).text().split(“#”)[]+“——”+$(“#lazynight”).text().split(“#”)[1]+“——”+$(“#lazynight”).text().split(“#”)[2]+“——”+$(“#lazynight”).text().split(“#”)[3]+“——”+$(“#lazynight”).text().split(“#”)[4]+“——”+$(“#lazynight”).text().split(“#”)[5]);
11 });
12 });
13
14 </script>
15 </head>
16 </span>
17 <input type=“button” value=“点我测试~~”>
18 <div id=“lazynight”>
19
02 <html xmlns=“http://www.w3.org/1999/xhtml”>
03 </span>
04 <meta http-equiv=“Content-Type” content=“text/html; charset=gb2312″ />
05
06 <script type=“text/javascript” src=“jquery-1.1.3.pack.js”></script>
07 <script type=“text/javascript”>
08 $(document).ready(function(){
09 $(“input[@value=点我测试~~]“).click(function(){
10 alert($(“#lazynight”).text().split(“#”)[]+“——”+$(“#lazynight”).text().split(“#”)[1]+“——”+$(“#lazynight”).text().split(“#”)[2]+“——”+$(“#lazynight”).text().split(“#”)[3]+“——”+$(“#lazynight”).text().split(“#”)[4]+“——”+$(“#lazynight”).text().split(“#”)[5]);
11 });
12 });
13
14 </script>
15 </head>
16 </span>
17 <input type=“button” value=“点我测试~~”>
18 <div id=“lazynight”>
19
</span>
20 life is beautiful#
21 but it’s complicated#
22 we barely make it#
23 we don’t need to understand#
24 there are miracles#
25 miracles
26 </pre>
27 </div>
28 </body>
29 </html> </div> 下载源码 转载请注明:[于哲的博客][1] » [jQuery 抄袭笔记(22) :split()][2] [1]: http://lazynight.me [2]: http://lazynight.me/644.html