# script

Specifies that the enclosed content is a client-side script.

## Platform Support

IE | Netscape | Mozilla | Opera | Safari
--- | --- | --- | --- | ---
3.0+ | 2.0+ | 1.0+ | 4.0+ | 1.0+

## Example

This example shows a basic <script> element for a JavaScript script:

    <script language="type/javascript">
    	<!-- JavaScript script... -->
    </script>
    <noscript> Your browser does not support JavaScript. </noscript>

## Remarks

Add the <noscript> </noscript> tags in case users have JavaScript turned off in their browsers.

## Attribute Detail

Attribute | IE | Netscape | Mozilla | Opera | Safari
--- | --- | --- | --- | --- | ---
charset Specifies the character set associated with the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
defer If present, specifies that execution of the element is deferred. | 3.0+ | 2.0+ | 1.0+ | 7.0+ | 1.0+
event [event-name]. Example values: onclick, onchange, etc. Specifies the event handler for the element. | 3.0+ | no | no | no | no
for [element-id]. Example values: myButton, textBox1, etc. Id corresponding to the form or event associated with the element. | 4.0+ | 1.1+ | 1.0+ | no | 1.0+
id [element-id] Unique identifier for the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
language (script) Specifies the scripting language. | 3.0+ | 2.0+ | 1.0+ | 4.0+ | 1.0+
src [url] URL for the source for the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
type (script) Specifies the type of script. | 3.0+ | 2.0+ | 1.0+ | 4.0+ | 1.0+
xml:space If set, specifies whether to override the default whitespace handling within the element. | 5.0+ | no | no | no | no

## Event Detail

Event | IE | Netscape | Mozilla | Opera | Safari
--- | --- | --- | --- | --- | ---
onload Fires when the content of the element finishes loading. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
onpropertychange Fires when one of the properties of the element changes. | 4.0+ | no | no | no | no
onreadystatechange Fires when the ready state of the element changes. | 4.0+ | no | no | no | no

## Availability

W3C HTML 4.01

text_html aptana_docs