event.stopPropagation()和event.preventDefault()

一、event.stopPropagation();阻止冒泡事件$(document).ready(function()n $(“span”).click(function(event)n event.stopPropagation();n alert(“The span element was clicked.”);n );n $(“p”).click(function(…