jQuery common event operations

Common event operations


##dom1 level event setting

    ##
  • ##itnode.onclick = function(){}
  • itnode.onclick = function;

##dom2 level event setting

##itnode.addEventListener(type, processing, event stream);

  • itnode.removeEventListener(type, Processing, event flow);

  • node.attachEvent();

  • node.detachEvent();

##jquery event settings


$ ().Event type (event processing function fn); //Set event

##$().Event type(); //Trigger event execution
  • Event types: click, keyup, keydown, mouseover, mouseout, blur, focus, etc.
  • ##For example: $('div').click(function(){event Trigger process this});

  • Note: This method inside the event function represents the dom node object inside the jquery object.
  •    php.cn     
    
Continuing Learning
||
php.cn
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!