Javascript-Forms Flashcards
What event is fired when a user places their cursor in a form control?
The focus event
What event is fired when a user’s cursor leaves a form control?
the blur event
What event is fired as a user changes the value of a form control?
the input event
What event is fired when a user clicks the “submit” button within a ?
the submit event
What does the event.preventDefault() method do?
it prevents an event to happen
What does submitting a form without event.preventDefault() do?
The form values get uploaded to the URL
What property of a form element object contains all of the form’s controls.
the elements property of the form object
What property of a form control object gets and sets its value?
the value property
What is one risk of writing a lot of code without checking to see if it works so far?
You can have a harder time debugging
What is an advantage of having your console open when writing a JavaScript program?
You can frequently check over your code to see if it running as you expect.