KISSY中的this

 1 <!DOCTYPE HTML>
2 <html lang="en">
3 <head>
4 <meta charset="GBK" />
5 <title></title>
6 <script type="text/javascript" src="kissy.js"></script>
7 <script type="text/javascript">
8 KISSY.ready(function(S){
9 S.one("#btn").on('click',function(){
10 alert(this);//这里的this 是原生的dom对象
11 var parseNode = new S.Node(this);
12 alert(parseNode.val());
13 });
14 });
15 </script>
16 </head>
17 <body>
18 <input type="button" value="Test" id="btn" />
19
20 <div id="d1">/</div>
21 </body>
22 </html>
posted @ 2011-10-23 21:00  sirzxj  阅读(300)  评论(0编辑  收藏  举报