Loading

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>

  

posted @ 2019-01-05 18:57  Sherlock-Tang  阅读(1648)  评论(0编辑  收藏  举报