<div >
            外层
            <span >
                内层
            </span>
        </div>
        <script type="text/javascript" src="js/jquery-3.1.1.min.js" ></script>
        <script>
            $("#first").click(function(){
                console.log("外层")
            })
            $("#second").click(function(event){
                event.stopPropagation(); 
                console.log("内层")
            })
        </script>

 

相关文章:

  • 2021-06-21
  • 2022-12-23
  • 2021-07-06
  • 2021-02-04
  • 2019-11-02
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-15
  • 2021-05-21
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案