AmitDiwan has Published 10740 Articles

HTML DOM Mark Object

AmitDiwan

AmitDiwan

Updated on 31-Jul-2019 14:07:48

200 Views

The HTML DOM Mark Object in HTML represents the element.SyntaxFollowing is the syntax −Creating a elementvar markObject = document.createElement(“MARK”)ExampleLet us see an example for HTML DOM Mark element − Live Demo HTML DOM Mark    form {       width:70%;       margin: 0 ... Read More

HTML DOM Map Object

AmitDiwan

AmitDiwan

Updated on 31-Jul-2019 14:04:54

221 Views

The HTML DOM Map Object in HTML represents the element.SyntaxFollowing is the syntax −Creating a elementvar mapObject = document.createElement(“MAP”)PropertiesHere, “mapObject” can have the following collections & properties −Collection/ PropertyDescriptionareasIt returns a collection of all elementsimagesIt returns a collection of all & elementsnameIt sets/returns the value ... Read More

HTML DOM Input DatetimeLocal name Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

108 Views

The HTML DOM Input DatetimeLocal name property returns a string, which is the value of the name attribute of input datetimeLocal. User can also set it to a new string.SyntaxFollowing is the syntax −Returning string valueinputDatetimeLocalObject.nameSetting name attribute to a string valueinputDatetimeLocalObject.name = ‘String’ExampleLet us see an example of Input ... Read More

HTML DOM KeyboardEvent getModifierState( ) Method

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

231 Views

The getModifierState() method returns true/false if the provided modifier key was pressed or not.SyntaxFollowing is the syntax −Calling getModifierState() with parameter as modifier keyevent.getModifierState(“modifierKey”)Modifier KeysHere, “modifierKey” can be the following −modifierKeyAltAltGraphCapsLockControlMetaNumLockScrollLockShiftExampleLet us see an example for getModifierState() method − Live Demo KeyboardEvent getModifierState()    form {     ... Read More

HTML DOM Input DatetimeLocal Object

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

123 Views

The HTML DOM Input DatetimeLocal Object represents an input HTML element with type datetimeLocal.SyntaxFollowing is the syntax −Creating an with type datetimeLocalvar datetimeLocalObject = document.createElement(“input”); datetimeLocalObject.type = “datetime-local”;AttributesHere, “datetimeLocalObject” can have the following attributes −AttributesDescriptionautocompleteIt defines the value of autocomplete attribute of a datetimeLocal fieldautofocusIt defines if the datetimeLocal ... Read More

HTML DOM KeyboardEvent key Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

108 Views

The KeyboardEvent key property returns the key identifier corresponding to the key pressed using an event.SyntaxFollowing is the syntax −Returning latest typed character’s identifier −event.keyExampleLet us see an example for KeyboardEvent key property − Live Demo KeyboardEvent key    form {       width:70%;       ... Read More

HTML DOM Input DatetimeLocal readOnly Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

217 Views

The HTML DOM Input DatetimeLocal readOnly property sets/returns whether Input DatetimeLocal can be modified or not.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputDatetimeLocalObject.readOnlySetting readOnly to booleanValueinputDatetimeLocalObject.readOnly = booleanValueBoolean ValuesHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that the input datetimeLocal field is readOnly.falseIt defines that the input datetimeLocal field ... Read More

HTML DOM KeyboardEvent keyCode Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

99 Views

The KeyboardEvent keyCode property returns the unicode character codes corresponding to character that was pressed using an event.Note − Use key property instead for accurate resultsSyntaxFollowing is the syntax −Returning latest typed character’s keyCode −event.keyCodeExampleLet us see an example for KeyboardEvent keyCode property − Live Demo KeyboardEvent keyCode ... Read More

HTML DOM Input DatetimeLocal required Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

138 Views

The HTML DOM Input DatetimeLocal required property determines whether Input DatetimeLocal is compulsory to set or not.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputDatetimeLocalObject.requiredSetting required to booleanValueinputDatetimeLocalObject.required = booleanValueBoolean ValuesHere, “booleanValue” can be the following −booleanValueDetailstrueIt is compulsory to set the datetimeLocal field to submit form.falseIt is the default ... Read More

HTML DOM KeyboardEvent location Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

137 Views

The HTML DOM KeyboardEvent loaction property returns the number corresponding to location of key pressed on the keyboard.SyntaxFollowing is the syntax −Returning location of pressed key −event.locationNumbersHere, number returned can be the following −numberDescriptions0It represents almost all values on the keyboard. (every key in the middle section of keyboard, eg: ... Read More

Advertisements