
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

169 Views
The HTML DOM Input Datetime max property returns/sets max attribute of Input Datetime.SyntaxFollowing is the syntax −Returning string valueinputDatetimeObject.maxSetting max to string valueinputDatetimeObject.max = YYYY-MM-DDThh:mm:ssTZDString ValuesHere, “YYYY-MM-DDThh:mm:ssTZD” can be the following −stringValueDetailsYYYYIt defines year (eg:1998)MMIt defines month (eg: 05 for May)DDIt defines Day (eg: 24)TIt is a separator for date and timehhIt defines hour (eg:12)mmIt defines minutes (eg:48)ssIt defines seconds (eg:00)TZDTime Zone Designator (IST denotes Indian Standard Time)ExampleLet us see an example of Input Datetime max property − Live Demo Input Datetime Max Date & Time: Renew Insurance var inputDate = document.getElementById("dateTime"); ... Read More

140 Views
The HTML DOM Input Datetime form property returns the reference of enclosing form for input datetime.SyntaxFollowing is the syntax −Returning reference to the form objectinputDatetimeObject.formExampleLet us see an example of Input Datetime form property − Live Demo Input Datetime form Date & Time: Get Form ID function getFormID() { var inputDatetime = document.getElementById("Datetime"); var divDisplay = document.getElementById("divDisplay"); divDisplay.textContent = 'Form ID for datetime input: '+inputDatetime.form.id; } OutputThis will produce the following output −Before clicking ‘Get Form ID’ button −After checking ‘Get Form ID’ button −

166 Views
The HTML DOM Input Datetime disabled property sets/returns whether Input Datetime is enabled or disabled.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputDatetimeObject.disabledSetting disabled to booleanValueinputDatetimeObject.disabled = booleanValueBoolean ValuesHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that the input datetime is disabled.falseIt defines that the input datetime is not disabled and it is also the default value.ExampleLet us see an example of Input Datetime disabled property − Live Demo Input Datetime Disabled Date & Time: Enable Datetime Input var divDisplay = document.getElementById("divDisplay"); var inputDatetime = document.getElementById("datetimeSelect"); divDisplay.textContent = 'Datetime Input ... Read More

140 Views
The HTML DOM Input Datetime autofocus property sets/returns whether Input Datetime is focused upon initial page load.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputDatetimeObject.autofocusSetting autofocus to booleanValueinputDatetimeObject.autofocus = booleanValueBoolean ValuesHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that input will be autofocused on page load.falseIt is the default value and input is not autofocused.ExampleLet us see an example of Input Datetime autofocus property − Live Demo Input Datetime Autofocus Date & Time: Remove Auto Focus var divDisplay = document.getElementById("divDisplay"); var inputDatetime = document.getElementById("Datetime"); divDisplay.textContent = 'Autofocus: '+inputDatetime.autofocus function removeAutoFocus() { ... Read More

130 Views
The HTML DOM Input Date value property returns a string, which is the value of the value attribute of input date. User can also set it to a new string.SyntaxFollowing is the syntax −Returning string valueinputDateObject.valueSetting value attribute to a string valueinputDateObject.value = ‘String’ExampleLet us see an example of Input Date value property − Live Demo Input Date Value Calendar: Change Value var divDisplay = document.getElementById("divDisplay"); var inputDate = document.getElementById("dateSelect"); divDisplay.textContent = 'Current value: '+ inputDate.value; function changeValue(){ var currDate = inputDate.value; ... Read More

120 Views
The HTML DOM Input Date type property returns/sets type of Input Date.SyntaxFollowing is the syntax −Returning string valueinputDateObject.typeSetting type to string valueinputDateObject.type = stringValueString ValuesHere, “stringValue” can be the following −stringValueDetailsdateIt defines that input type is dateradioIt defines that input type is radiocheckboxIt defines that input type is checkboxExampleLet us see an example of Input Date type property − Live Demo Input Date type Calendar: Change Type var divDisplay = document.getElementById("divDisplay"); var inputDate = document.getElementById("dateSelect"); divDisplay.textContent = 'Input type: '+ inputDate.type; function changeType(){ ... Read More

82 Views
The HTML DOM Input Date stepUp() method defines the amount of days the date field should increase.SyntaxFollowing is the syntax −Calling stepUp method with a number, which by default is equal to 1inputDateObject.stepUp(number)ExampleLet us see an example of Input Date stepUp method − Live Demo Input Date stepUp() Calendar: Increase by 2 Increase by 3 var divDisplay = document.getElementById("divDisplay"); var inputDate = document.getElementById("dateSelect"); function changeStep(num){ if(num===2) inputDate.stepUp(2); else inputDate.stepUp(3); divDisplay.textContent = 'Current date increased by: '+num; } OutputThis will produce the following output −Clicking ‘Increase by 2’ button −Clicking ‘Increase by 3’ button −

105 Views
The HTML DOM Input Date stepdown() method defines the amount of days the date field should decrease.SyntaxFollowing is the syntax −Calling stepDown method with a number, which by default is equal to 1inputDateObject.stepDown(number)ExampleLet us see an example of Input Date stepDown method − Live Demo Input Date stepDown() Calendar: Decrease by 2 Decrease by 3 var divDisplay = document.getElementById("divDisplay"); var inputDate = document.getElementById("dateSelect"); function changeStep(num){ if(num===2) inputDate.stepDown(2); else inputDate.stepDown(3); divDisplay.textContent = 'Current date decreased by: '+num; } OutputThis will produce the following output −Clicking ‘Decrease by 2’ button −Clicking ‘Decrease by 3’ button −

155 Views
The DOM PageTransitionEvent is an event which occurs when a user navigates between the webpages.Property of PageTransitionEvent objectPropertyExplanationpersistedIt returns true or false value depending upon whether the webpage was cached or not.Types of events belong to PageTransitionEvent objectEventsExplanationpageHideIt happens when the user navigates away from a webpage.pageShowIt happens when the user navigates to a webpage.ExampleLet us see an example of PageTransitionEvent object − Live Demo body{ text-align:center; color:#fff; background: #ff7f5094; height:100%; } .btn{ background:#0197F6; border:none; ... Read More

179 Views
The DOM readyState property returns the loading status of the current HTML document.SyntaxFollowing is the syntax −document.readyStateExampleLet us see an example of readyState property − Live Demo html{ height:100%; } body{ text-align:center; color:#fff; background: #ff7f5094; height:100%; } p{ font-weight:700; font-size:1.2rem; } .btn{ background:#0197F6; border:none; height:2rem; border-radius:2px; width:35%; margin:2rem auto; ... Read More