Example, changing the text depending on the browser. For example here is a very simple JavaScript enabled web page. In Dreamweaver, add the JavaScript code you see to a web page. Older web browsers, including Netscape 1.x, Explorer 3.0 and earlier AOL before 4.0 Don't support JavaScript, and may have trouble if there is JavaScript code in the HTML file. It's therefore good practice to hide the JavaScript code from these older browsers.
Variables are software containers that hold a value.
Variables can have almost any name, as long as the name does not contain any spaces or other special characters. Another restriction is that variable cannot be named the same as any JavaScript reserved words , which are names that have special meaning for the language. Finally, the case of JavaScript variable names is important, so a variable named someText is different from a variable named SomeText . Then, change the text assigned to the variable someText, and preview the results. Now, change your code to look like the following.