jQuery相应事件的参数及回调函数

   
 <script>
        $(function(){
            var eventType, textValue, textStatus;
            $('input[type="submit"]').on(
                'mouseover',
                {status:'important'},
                function(e){
                    eventType = e.type;
                    textValue = $('textarea').val();
                    textStatus = e.data.status;
                    alert(eventType+' '+textValue+' '+textStatus);
                }
            )
        })
    </script>

  

猜你喜欢

转载自www.cnblogs.com/sherlock-tang/p/10225686.html