点击.box跟点击.box.box1

<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>click</title>
<script type="text/javascript" src='jquery-2.2.0.min.js'></script>
<style type="text/css">
div{
width:200px;
height:200px;
background-color:red;
}
</style>
</head>
<body>
<div class='box'>
hello
</div>
<div class='box box1'>
hello
</div>
</body>
<script type="text/javascript">
$('.box').click(function(){
alert();
})
$('.box.box1').click(function(){
alert()
})
</script>
</html>

点击.box会出现1111

点击.box.box1的时候出现1111  3333弹出两次

上一篇:WAV文件头相关资料


下一篇:IPv6 tutorial – Part 5: Address types and global unicast addresses