JavaScript code is typically embedded into an HTML document using the SCRIPT tag. You are free to embed as many scripts into a single document as you like, using multiple SCRIPT tags. A script embedded in HTML with the SCRIPT tag uses the format:
The LANGUAGE attribute is optional, but recommended. You may specify that a section of code only be executed by browsers which support a particular version of JavaScript; for instance:
The external file is simply a text file containing JavaScript code, and whose filename ends with the extension ".js". Note that although some version 3 browsers support the SRC attribute, it only functions reliably across platforms in the version 4 browsers.
Scripts can be placed inside comment fields to ensure that your JavaScript code is not displayed by old browsers that do not recognize JavaScript. The markup to begin a comment field is . This practice is certainly optional, but considered good form when your page is likely to be visited by older browsers. Certainly, as older browsers fade away, this practice will likely become unnecessary.
Edwin van der Sar meminta manajer Manchester United untuk segera
membangkitkan motivasi para pemain. Manchester United mengundang perhatian
dari para manta...
1 comments:
[ Placing Code ]
[ Functions ]
[ Events ]
[ Comments ]
[ Conditionals-looping ]
[ Hiding the JavaScript ]
[ Date object ]
[ Prompt Method ]
[ Alert Method ]
[ Confirm Method ]
[ write and writeln ]
[ Operators ]
[ Variable ]
[ When JS Statements Run ]
[ Objects ]
[ Examples ]
[ Glossary Terms ]
Post a Comment