Found 10483 Articles for Web Development

How to know the browser language and browser platform in JavaScript?

Lokesh Yadav
Updated on 08-Dec-2022 07:48:23

695 Views

In this article we are going to discuss how to know the browser language and browser platform with the help of examples in JavaScript To know the various properties of the browser, the JavaScript provides Navigator object. The Navigator object has several properties, which include - connection, credentials, cookies, geolocation, language, platform, etc. We are concerned with Navigator.language and Navigator.platform to know the language and platform of the browser. Let us discuss about them in detail. Navigator.language The read-only Navigator.language property returns a string that represents the browser UI language. It returns a string that returns the language version. For ... Read More

HTML DOM Input Time defaultValue Property

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

353 Views

The HTML DOM Input Time defaultValue property sets/returns the default value corresponding to Time Input. The value attribute changes as the user changes the time but default value does not change.SyntaxFollowing is the syntax −Returning string valueinputTimeObject.defaultValueSetting defaultValue to stringinputTimeObject.defaultValue = ‘string’ExampleLet us see an example of Input Time defaultValue property − Live Demo Input Time defaultValue    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: ... Read More

HTML DOM Input Time autofocus Property

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

99 Views

The HTML DOM Input Time autofocus property sets/returns whether Input Time is focused upon initial page load.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputTimeObject.autofocusSetting autofocus to booleanValueinputTimeObject.autofocus = booleanValueBoolean ValuesHere, “booleanValue” can be the following:booleanValueDetailstrueIt defines that input will be autofocused on initial page load.falseIt is the default value and input is not autofocused.ExampleLet us see an example of Input Time autofocus property − Live Demo Input Time autofocus    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px; ... Read More

HTML DOM Input Text value Property

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

178 Views

The HTML DOM Input Text value property returns a string, which is the value of the value attribute of input Text. User can also set it to a new string.SyntaxFollowing is the syntax −Returning string valueinputTextObject.valueSetting value attribute to a string valueinputTextObject.value = ‘String’ExampleLet us see an example of Input Text value property − Live Demo Input Text value    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {     ... Read More

HTML DOM Input Text type Property

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

229 Views

The HTML DOM Input Text type property returns/sets type of Input Text.SyntaxFollowing is the syntax −Returning string valueinputTextObject.typeSetting type to string valueinputTextObject.type = stringValueString ValuesHere, “stringValue” can be the following −stringValueDetailsemailIt defines that input type is emailtextIt defines that input type is textradioIt defines that input type is radiotelIt defines that input type is tel and a number keypad is shown for inputExampleLet us see an example of Input Text type property − Live Demo Input Text type    form {       width:70%;       margin: 0 auto;       text-align: center;    } ... Read More

HTML DOM Input Text size Property

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

197 Views

The HTML DOM Input Text size property returns/sets the size property for input text. If not defined this property returns ‘20’.SyntaxFollowing is the syntax −Returning size attributeinputTextObject.sizeSet size property to a numberinputTextObject.size = numberExampleLet us see an example of Input Text size property − Live Demo Input Text size    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    } Text-size ... Read More

HTML DOM Input FileUpload autofocus Property

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

116 Views

The HTML DOM Input FileUpload autofocus property sets/returns whether Input FileUpload is focused upon initial page load.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputFileUploadObject.autofocusSetting autofocus to booleanValueinputFileUploadObject.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 FileUpload autofocus property − Live Demo Input FileUpload autofocus    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px; ... Read More

HTML DOM Input FileUpload accept Property

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

117 Views

The HTML DOM Input FileUpload accept property returns a string, which is the value of the accept attribute of FileUpload. User can also set it to a new value.SyntaxFollowing is the syntax −Returning string valueinputFileUploadObject.acceptSetting value attribute to a string valueinputFileUploadObject.accept = valueExampleLet us see an example of Input FileUpload accept property − Live Demo Input FileUpload accept      form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"]{       ... Read More

HTML DOM Input Email value Property

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

150 Views

The HTML DOM Input Email value property returns a string, which is the value attribute of input Email. User can also set it to a new string.SyntaxFollowing is the syntax −Returning string valueinputEmailObject.valueSetting value attribute to a string valueinputEmailObject.value = ‘String’ExampleLet us see an example of Input Email value property − Live Demo Input Email value    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;   ... Read More

HTML DOM Input Email type Property

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

119 Views

The HTML DOM Input Email type property returns/sets type of Input Email.SyntaxFollowing is the syntax −Returning string valueinputEmailObject.typeSetting type to string valueinputEmailObject.type = stringValueString ValuesHere, “stringValue” can be the following −stringValueDetailsemailIt defines that input type is emaildatetime-localIt defines that input type is datetime-localradioIt defines that input type is radiotelIt defines that input type is tel and a number keypad is shown for inputExampleLet us see an example of Input Email type property − Live Demo Input Email type    form {       width:70%;       margin: 0 auto;       text-align: center;    } ... Read More

Advertisements