CMA (Form+input Elements)
CMA (Form+input Elements)
1. Textbox: it is used to enter only single line of text and not able to enter multiple line of text. And we
can use textbox in the form by using <input> tag and type attribute.
<form>
Username : <input type=”text”>
Password : <input type=”text”>
</form>
2. Textarea : it is used to enter multiple line of text and we can enter multiple lines in this input type ,
3. Radio button : It is used to select only one option from the list of options either 1 option or second
option but not able to select both the options.
4. Check box : it is used to select multiple items from the list of elements.
<input type=”checkbox”>BCA4<br>
<input type=”checkbox”>MCA<br>
<input type=”checkbox”>Mtech<br>
<input type=”checkbox”>BE
5. Button(Command Button) : it is used to click then button
6. Submit button : it is used to submit the data entered by the user to the server after entering all the data
the form will be empty.
3. Method :
4. Autocomplete (is on or off)
The autocomplete attribute specifies whether a form should have auto complete on or off.
When autocomplete is on, the browser automatically complete values based on values that the user
has entered before.
5. no validate
The novalidate attribute is a boolean attribute.
When present, it specifies that the form-data (input) should not be validated when submitted.
Example
A form with a novalidate attribute:
<form action="/action_page.php" novalidate>
Example
<label for="cars">Choose a car:</label>
<select id="cars" name="cars" size=”3” multiple>
<option value="Volvo">Volvo</option>
<option value="Maruti 800"> Maruti 800</option>
<option value="fiat">Fiat</option>
<option value="Audi">Audi</option>
</select>
4. <Textarea> : it is a big textbox used to enter multiple line of text.
Address : <textarea></textarea>
5.<Button>: it is used to add button in the web page.
<button type=”button” onclick=”alert(‘hi welcome’)”>CLICK ME
6.<Fieldset> & <legend> : it is used to organise the data and elements.
<fieldset>
<legend>PERSONAL DATA</legend>
Firstname : <input type=”text”>
Lastname : <input type=”text”>
DOB:<input type=”date”>
</fieldset>