Javascript Articles - Page 529 of 534

How to enable JavaScript in Internet Explorer (IE)?

Alshifa Hasnain
Updated on 27-Mar-2025 19:34:23

648 Views

To enable JavaScript in Internet Explorer (IE), follow the below-given steps: Opening Internet Options Click the gear icon on the right-hand side: Navigating to Security Settings Now, a dialog box will open. Go to the Security tab and click Custom level. After reaching the Security Settings, go to Scripting, then Active Scripting. Enabling Active Scripting Click Enable to enable JavaScript and press Ok. Now, JavaScript will enable after clicking Ok.  Conclusion Once you enable Active Scripting and save the changes, JavaScript will be activated in Internet Explorer. Restarting the browser may be required for the settings to take effect.

Should I include language="javascript" in my SCRIPT tags?

mkotla
Updated on 30-Sep-2019 07:42:16

538 Views

The language attribute in JavaScript is optional since the introduction of HTML5 brought some new improvements. JavaScript became the default language for HTML5 and modern browsers. Therefore, now adding javascript isn’t required in tag.This attribute specifies what scripting language you are using. Typically, its value will be javascript. Although recent versions of HTML (and XHTML, its successor) have phased out the use of this attribute.Here you can see how it is used:                              

Should I include type='text/javascript' in my SCRIPT tags?

Alshifa Hasnain
Updated on 26-Mar-2025 12:04:57

2K+ Views

The type attribute in JavaScript is optional since the introduction of HTML5 brought some new improvements. JavaScript became the default language for HTML5 and modern browsers. So, now adding text/javascript isn’t required in tag. This attribute is what is now recommended to indicate the scripting language in use and its value should be set to "text/javascript". Example Here you can see how it is used: Output

How to use case-insensitive switch-case in JavaScript?

usharani
Updated on 03-Jan-2020 06:20:08

2K+ Views

To use case-insensitive switch-case in JavaScript, make the input all upper or all lowercase.ExampleYou can try to run the following code to learn how to use a case-insensitive switch:           JavaScript Strings                      var str = "amit";          str = str.toUpperCase();          switch (str) {             case 'AMIT': document.write("The name is AMIT ");             break;             case 'JOHN': document.write("The name is JOHN ");             break;             default: document.write("Unknown name")          }          document.write("Exiting switch block");          

Why is JavaScript case sensitive but HTML isn't?

varun
Updated on 12-Sep-2019 08:28:32

593 Views

A script is in plain text and not just markup like HTML, which is case insensitive. In JavaScript, the while keyword should be "while", not "While" or "WHILE". Case sensitivity is important since it is closely related to HTML, but some methods and events are mentioned differently. JavaScrip has a strict syntax to process the client-side-scripts written in JavaScript.Some tags and attributes in HTML have the same name as JavaScript objects and properties. In HTML, the attribute and tag names are case-insensitive. The close association of HTML and JavaScript can lead to confusion, so case sensitivity is more important in ... Read More

What is the difference between HTML tags <div> and <span>?

Bhanu Priya
Updated on 04-Oct-2023 16:21:13

3K+ Views

We can use both DIV and SPAN tags as a Container, as they both have their own specialty. Both are HTML5 tags. First let us discuss about DIV Tag in detail with examples. DIV TAG DIV helps in separating the data like text, images, navigation bar etc., we can also create particular sections by using the DIV tag, it consists of open and close tags , both open and close tags are compulsory if we want to divide the page. DIV tags can be styled with CSS or manipulated with JavaScript, it is easily styled by using the class ... Read More

What is the difference between “lang” and “type” attributes in a script tag?

Arushi
Updated on 12-Sep-2019 08:31:25

327 Views

JavaScript lang attributeThis attribute specifies what scripting language you are using. Typically, its value will be javascript. Although recent versions of HTML (and XHTML, its successor) have phased out the use of this attribute.JavaScript type attributeThis attribute is what is now recommended to indicate the scripting language in use and its value should be set to "text/javascript".Here you can see how it is used:Live Demo                              

What does language attribute do in