我们可以在事件类型上设置条件,例如如果事件click然后警报“点击”如果事件mouseover然后警报“结束”。但是当功能在页面上加载时,我的功能会发出警报值
<head>
<script type="text/javascript" src="jquery-1.7.2.js"></script>
<script type="text/javascript">
$(function() {
    if($('.wait').click()) {
        alert('click')
    }
    else if ($('.wait').mouseenter()) {
        alert('mouseenter')
    }
})
</script>
<style>
    .wait {color:#F00}
    .nowait {color:#00F}
</head>
<body>
    <div class="wait">abc.....</div>
    <div class="wait">abc.....</div>
    <div class="wait">abc.....</div>
</body>