Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
8 views
Css chapter 3
Css notes
Uploaded by
aditidhotre2002
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Css chapter 3 For Later
Download
Save
Save Css chapter 3 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
8 views
Css chapter 3
Css notes
Uploaded by
aditidhotre2002
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Css chapter 3 For Later
Carousel Previous
Carousel Next
Save
Save Css chapter 3 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 42
Search
Fullscreen
Te ee ¢ Form and Event Handling CHAPTER 3 Syllabus | eee | 3.1 Building blocks of a Form, properties and methods of form, button, | | text, text area, checkbox, radio button, select element | 3.2 Form events — mouse event, key events | | 3.3 Form objects and elements | | 3.4 Changing attribute value dynamically 3.5 Changing option list dynamically 3.6 Evaluating checkbox selection 3.7 Changing a label dynamically 3.8 Manipulating form elements 3.9 Intrinsic JavaScript functions, disabling elements, read only elements. 1 3.1 BUILDING BLOCKS OF A FORM, PROPERTIES AND METHODS OF FORM, BUTTON, TEXT, TEXT AREA, CHECKBOX, RADIO BUTTON, SELECT ELEMENT % 3.1.1 Building Blocks of a Form Form object represents an HTML form.4 (Form and Event Handling) Pano (3, ing Lange © The
tag is used to add HTML forms to the web page for \,,, input. Forms are used to pass the data submitted by the user tc, the server © It is used to collect user input through elements like text fields, che, box and radio button, select option, text area, submit buttons and etc Syntax
..
The
Element * The HTML
element is the most used form element. * An
element can be displayed in many ways, depending on the type attribute. | ‘Type ae Description
Displays a single-line text input field
Displays a radio button (for selecting one of many choices) +t
| Displays a checkbox (for selecting zero or | i more of many choices)
Displays a submit button (for submitting the form) — —
Displays a clickable button The
element contains other HTML tags, which define the inp! method of data |. The
tag defines a form field to create a multiline input area. 2. The
tag sets up a control for creating a drop-down list box. f | | | 3 The
tag defines the items in the drop-down list set by the
tag. 4. The
tag group is related data in the drop-down list set by the
tag. 6 The
tag sets the text label for the
element. (New Syll. wef academic year 19-20) (D5-16A) Eh peep type Publicatio™®cient Side Scripting Language (MSBTE) (Form and Event Handling) Pg. no. (3-3) 3.1.2 Properties and Methods of Form a form | propert rties Action ih sets and returns the value of the action attribute in a form. Property | ; Description ie anctype a sets and returns the value of the enctype attribute in a form | Length It returns the number of elements in a form Method | Tt sets and returns the value of the method attribute in a form | that i is GET or POST. | Name Its sets and returns the value of apg name e atrib te ina form. | Target It sets and returns the value of the target attribute in a form. Form methods Method Description reset() It resets a form. submit() It submits a form. Example 1 (YQ Write a JavaScript to design a form to accept values for user ID & 4 ‘ password. | WST=atSs RA Ae Ey i “
Login Page Sates >
Ewer Username:
Luter Password:
“input type="button" onclick ="signIn()" value="Sign In">
Sseript> Sune Sidnet ion signin() SH Syl. wef academic year 19-20) (D5-16A) (te) Tech-Neo Publications. “aage MSBTE Form and Event Handling) Pa. no (3 4 document. write(User 1D: " + loginatserID.value + "
" + “Password: ” + login.paseword.calue): i
<‘himl > x + & Fie | DyTechNeo%20Publications/form.Atmt Dr/TechNeo%20Publications/farm html & D File Example 2 YQ. Write 2 java script that displays textboxes for accepting name Bi email ID & a submit button. Write java script code such that when ; the user clicks on submit button. (1) Name Validation (2) Email ID ' Validation. Sea (c), W-19, 6 Marks
Form Validation