AmitDiwan has Published 11367 Articles

HTML DOM MenuItem Object

AmitDiwan

AmitDiwan

Updated on 31-Jul-2019 14:34:28

62 Views

The HTML DOM MenuItem Object in HTML represents the element.NOTE − element only supported in Mozilla Firefox Browser.SyntaxFollowing is the syntax −Creating a elementvar menuItemObject = document.createElement(“MENUITEM”)PropertiesHere, menuItemobject can have the following properties −PropertyDescriptioncheckedIt sets/returns (true/false) if the menu item should be checkedcommandIt sets/returns the value of ... Read More

HTML DOM Menu Object

AmitDiwan

AmitDiwan

Updated on 31-Jul-2019 14:13:17

44 Views

The HTML DOM Menu Object in HTML represents the element.NOTE − element only supported in Mozilla Firefox Browser.SyntaxFollowing is the syntax −Creating a elementvar menuObject = document.createElement(“MENU”)ExampleLet us see an example for HTML DOM Menu element − Live Demo Menu Object    form {   ... Read More

HTML DOM Mark Object

AmitDiwan

AmitDiwan

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

114 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

113 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

51 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

150 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

60 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

48 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

108 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

48 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

Advertisements