JQuery

jquery事件

2017-06-13  本文已影响8人  鸭梨山大哎

jquery事件

代码展示

<head>
<script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(function(){
    $("p").click(function(){
        $(this).hide();
        
    });
});
</script>
</head>
<p> I am a good man</p>

学习感悟

疑惑

上述$(this)中this是选择器么?

参考

jQuery 教程 | 菜鸟教程
Jquery中的this与$(this) - Chris.gong - 博客园

上一篇 下一篇

猜你喜欢

热点阅读