当前位置:网站首页>Keyboard events and form events

Keyboard events and form events

2022-06-10 06:49:00 Dunhuang Bi paintings

Keyboard events and form events

Keyboard events

  • Key events

    keydown Press down , In response to any key press

    keypress Press down , Respond to keys and... That can input characters enter Key press

    keyup lift , Respond to any key lift

  • e.keyCode e.which

    e.keyCode Get the key value of the key

    e.which Get the key value of the key , Or the key value pressed by the mouse

Form Events

  • onfocus onblur

    Form elements get ( Lose ) The focus triggers , As long as non form elements can get focus , It can also trigger this event , such as a document etc. .

  • onchange

    Triggered when the content changes , Generally used in input select On the label .

  • onsubmit

    When you click submit After button ,form The tag will trigger this event .

  • onreset

    When you click reset After button ,form The tag will trigger this event .

  • onselect

    Triggered when the text in the form is selected , Not only form , Other tags can also trigger this event .

have access to .focus() .blur() .submit() .reset() Methods by js To complete various operations .

√. Case study or Homework

People move

Automatic wheel broadcasting

Seamless rotation

Rolling clock

原网站

版权声明
本文为[Dunhuang Bi paintings]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/161/202206100642144497.html