js event event

Event object represents the state of the event, such as an event in which the state of the element occurs, the state of the keyboard keys, mouse position, mouse buttons.

Event is usually used in conjunction with the function, the function will not be executed before the event occurs!

Get real-time value of the current input: <input type = "text" onblur = "compayNameOnInput (event);" placeholder = " The new corporate name">
var compayNameOnInputVal;
function compayNameOnInput (Event) {
compayNameOnInputVal = event.target.value;
}
reference article

Guess you like

Origin blog.51cto.com/14153240/2445713