Web Development HTML Guide - Learn HTML
Developer Tutorials
ASP
CGI & Perl
CSS
Flash
HTML
Java
JavaScript
Linux
MySQL
PHP
Photoshop
Python
Wireless
XML



Developer Manuals
Learn HTML
Learn PHP
Learn MySQL
Learn CSS
Learn Pear


Developer Scripts
ASP Scripts
ASP.NET Scripts
CGI & Perl Scripts
Flash Scripts
Java Scripts
JavaScript Scripts
PHP Scripts
Python Scripts
Remotely Hosted Scripts
Tools & Utilities Scripts
XML Scripts

Developer Resources
Developer Tools
Developer News
Developer Forums
Developer Content
Developer Book Reviews
Survey Software

Web Hosting Directory
Budget Web Hosting
ColdFusion Hosting
Dedicated Servers
Domain Hosting
E-Commerce Hosting
Email Hosting
Free Web Hosting
Linux Web Hosting
Managed Hosting
Reseller Hosting
Small Business Hosting
Windows Web Hosting

<SCRIPT ...>

Usage Recommendation
use it, but don't rely on it

  • TYPE: Which scripting language to use
  • SRC: External source for script
  • DEFER: Continue loading page while downloading script
 
  • LANGUAGE: Deprecated indicator of language
  • FOR: object for which this script is an event handler
  • EVENT: the event this script handles

<SCRIPT ...> designates a script section of the page. The contents of <SCRIPT ...> are run using the scripting language set by the rquired TYPE attribute. For example, the following <SCRIPT ...> sets a short JavaScript, by far the most common scripting language.

<SCRIPT TYPE="text/javascript">
<!--
document.write("right now: " + new Date());
//-->
</SCRIPT>

which outputs the current date and time:

It is a popular but inaccurate belief that the LANGUAGE attribute is required for <SCRIPT ...>. In fact, LANGUAGE has never been a required attribute and has not been the standard way to indicate scripting language for several years.

<SCRIPT ...> elements should always begin with <!-- on the first line. The last line should begin with the line-level comment string for the scripting language (// in JavaScript) followed by -->, as in the exampl above.


Copyright Idocs, Inc. Written by Miko Sullivan











About the NetVisits, Inc Network | Advertise
Developer Tutorials hosted by HostGator.
Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy.
Visit other NetVisits, Inc. sites: