
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 2202 Articles for HTML

334 Views
The HTML DOM Input Search disabled property is used for setting or returning whether the search field should be disabled or not. It uses boolean values with true representing the element should be disabled and false otherwise. The disabled property is set to false by default. However, the disabled element is greyed out by default and is unclickable.SyntaxFollowing is the syntax for −Setting the disabled property −searchObject.autofocus = true|falseHere, true=search field is disabled and false=the search field is not disabled. It is false by default.ExampleLet us look at an example for the Input Search disabled property −Live Demo ... Read More

148 Views
The HTML DOM Input Search defaultValue property is used for setting or getting the defaultValue of a search field. The defaultValue of an element is the value assigned to the value attribute. The difference between value and defaultValue property is that the defaultValue property retains the original default value while the value property value change based on the user input in the search field.SyntaxFollowing is the syntax to set the defaultValue property −searchObject.defaultValue = valueHere, “value” is the search field default value.ExampleLet us look at an example for the Search defaultValue property −Live Demo Input Search defaultValue Property ... Read More

131 Views
The HTML DOM Input Search autofocus property is associated with the HTML element’s autofocus attribute. This property is used for setting or returning if the input search field should automatically be focused when the page loads or not.SyntaxFollowing is the syntax for −Setting the autofocus property −searchObject.autofocus = true|falseHere, true represents the search field should get focus and false represents otherwise. It is set to false by default.ExampleLet us look at an example of the Input search autofocus property − Input search autofocus property FRUITS: Get the autofocus attribute value for the above search ... Read More

257 Views
The HTML DOM Input Search autocomplete property is associated with the autocomplete attribute of the element with type=”search”. The autocomplete attribute takes “on” or “off” value. The on value specifies that the web browser must automatically complete user text based on previous input while false states otherwise.SyntaxFollowing is the syntax for −Setting the autocomplete Property −searchObject.autocomplete = "on|off"Here, on means the web browser will complete the user input automatically based on previous input while false states that it will not complete any of the user input based on previous inputs. It has the value set to on by default.ExampleLet ... Read More

384 Views
The HTML DOM Input reset value property is used to return the value of reset button value attribute or to set it. The value property for reset button changes the text that is displayed upon button as by default the text is “Reset”.SyntaxFollowing is the syntax for −Setting the value property −resetObject.value = text;Here, text is used for specifying the text displayed on the reset button.ExampleLet us look at an example for the input reset value property −Live Demo Input reset Value property UserName: Location: Get the above element value by ... Read More

172 Views
The HTML DOM Input Reset type property is associated with the input element having its type=”reset”. It will always return reset for the input reset element.SyntaxFollowing is the syntax for reset type property −resetObject.typeExampleLet us look at an example for the reset type property − Input reset type Property UserName: Location: Get the above input element type by clicking the below button GET Type function resetType() { var P=document.getElementById("RESET1").type; document.getElementById("Sample").innerHTML = "The type for the input field is: "+P ; } ... Read More

168 Views
The HTML DOM Input Reset object is associated with the element with type “reset”. We can create and access an input element with type reset by using the createElement() and getElementById() method respectively.PropertiesFollowing are the properties for the Input reset object −PropertyDescriptionautofocusTo set or return if the reset button should get focus automatically when the page loads or not.defaultValueTo set or return the reset button default value.disabledTo set or return if the reset button has been disabled, or not.formTo return the reference of the form containing the reset button.nameTo set or return the name attribute value of the reset ... Read More

160 Views
The HTML DOM Input Reset name property is used for setting or returning the name attribute of a reset button. The name attribute helps in identifying the form data after it has been submitted to the server.SyntaxFollowing is the syntax for −Setting the name property −resetObject.name = nameHere, name is for specifying the reset button name.ExampleLet us look at an example for the Reset name property − Input range name Property UserName: Location: Change the name of the above reset button by clicking the below button CHANGE NAME function ... Read More

206 Views
The HTML DOM form method property is associated with the method attribute of a form element. This property is used for specifying how the form data should be sent to the server. The address to send data is specified by the action attribute. This property sets or gets the form method property value.SyntaxFollowing is the syntax for −Setting the method property −formObject.method = get|post;Here, get is the default method and appends the form-data to the url. Eg: URL?name=value&name=value. It is usually not secure and can be used for data that is not private. The user can see the data being ... Read More

413 Views
The HTML DOM Form length property is used for returning the number of elements that are present inside the form. It is a read-only property.SyntaxFollowing is the syntax of the Form length property −ormObject.lengthExampleLet us look at an example of the Form length property − form{ border:2px solid blue; margin:2px; padding:4px; } function getLength() { var len=document.getElementById("FORM1").length ; document.getElementById("Sample").innerHTML = "Number of elements present inside the form are :"+len; } Form length property example ... Read More