<script>
Last updated
Last updated
The <script>
element allows the specification of a block of client-side scripting language code, and is analogous to the HTML <SCRIPT> element.
Name | Data type | Description |
---|---|---|
It is advisable to place all script text between CDATA delimiters: “<![CDATA[” and “]]>”. Alternatively, conditional ECMAScript expressions that use the “<” or “>” symbols can use the replacements “<” and “>”, respectively.
The output of the above script would be:
Computer: The test variable is set to twelve hundred thirty-four.
None
<block>, <catch>, <error>, <filled>, <foreach>, <form>, <help>, <if>, <noinput>, <nomatch>, <vxml>
src
The URI specifying the location of the script, if it is external.
srcexpr
Dynamically determine the URI to fetch by evaluating this ECMAScript expression.
charset
(defaults to “UTF-8”) The character encoding of the script designated by src.
fetchhint
This attribute is not supported.
fetchtimeout
(defaults to “fetchtimeout” global property value) The timeout for fetches. Must be specified with the appropriate time units (e.g., “120s” for 120 seconds).
maxage
(defaults to “scriptmaxage” global property value) Tells the platform the maximum acceptable age, in seconds, of cached scripts.
maxstale
(defaults to “scriptmaxstale” global property value) Tells the platform the maximum acceptable staleness, in seconds, of expired cached scripts.