JavaScript and Forms - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

JavaScript and Forms

Description:

number of elements in the form. name form action='#' name ... onclick. onfocus. onmousedown. onmouseup. Methods. blur() focus() click() Common Properties ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 10
Provided by: CCBC3
Category:

less

Transcript and Presenter's Notes

Title: JavaScript and Forms


1
JavaScript and Forms
  • Week 6 - Presentation 2
  • Veronica Noone

2
The Form
  • Responds to 2 events
  • onsubmit
  • onreset
  • Methods
  • reset()
  • submit()
  • Common Properties
  • action
  • elements
  • array of elements in the form
  • length
  • number of elements in the form
  • name

ltform action"" name"sampleForm01"
onsubmit""gt lt/formgt
3
Textboxes
  • Events
  • onblur
  • onchange
  • onfocus
  • onselect
  • Methods
  • blur()
  • focus()
  • select()
  • Common Properties
  • defaultValue
  • form
  • type
  • Will return text
  • name
  • value

4
Group Project
  • In small groups research your assigned Form
    Object and Create a sample file to show the
    class.
  • Buttons
  • CheckBox
  • Radio
  • Textarea
  • Select and Option
  • Your sample should showcase at least 2 methods
    and display at least 2 properties of your
    assigned object.

5
Buttons
  • Events
  • onblur
  • onclick
  • onfocus
  • onmousedown
  • onmouseup
  • Methods
  • blur()
  • focus()
  • click()
  • Common Properties
  • value
  • form
  • type
  • Will return button
  • name

6
Checkbox
  • Common Properties
  • value
  • form
  • type
  • Will return checkbox
  • name
  • checked
  • defaultChecked
  • Events
  • onblur
  • onclick
  • onfocus
  • Methods
  • blur()
  • focus()
  • click()

7
Radio
  • Common Properties
  • value
  • form
  • type
  • Will return checkbox
  • name
  • checked
  • defaultChecked
  • Events
  • onblur
  • onclick
  • onfocus
  • Methods
  • blur()
  • focus()
  • click()

8
Textarea
  • Common Properties
  • value
  • form
  • type
  • Will return textarea
  • name
  • defaultValue
  • Events
  • onblur
  • onchange
  • onfocus
  • onkeydown
  • onkeypress
  • onkeyup
  • onselect
  • Methods
  • blur()
  • focus()
  • select()

9
Select and Option
  • Select events
  • onblur
  • onchange
  • Onfocus
  • Select Methods
  • blur()
  • focus()
  • Select Properties
  • Form
  • Lenth
  • Name
  • Options
  • selectedIndex
  • type
  • Option Properties
  • defaultSelected
  • Index
  • selected
  • text
  • value
Write a Comment
User Comments (0)
About PowerShow.com