<script>
The <script>
tag can be used within a <static>
element to specify JavaScript code to run when the QuickApp is rendered to a static HTML
target.
Description
The <script>
element can either take a url_
attribute
that specifies a link to external JavaScript code or can include a <code
language_="js">
tag that explicitly specifies the JavaScript code to run. For
more information, see <code>
.
Syntax
<dynamic> <render> <static> <script url_="[EXTERNAL_JAVASCRIPT_SCRIPT]"/> </static> </render> </dynamic>
Alternate syntax
<dynamic> <render> <static> <script> <code language_="js"> [JAVASCRIPT_CODE] </code> </script> </static> </render> </dynamic>
Attributes
url_
- Specifies the URL to the JavaScript code to run when the QuickApp is rendered to a static HTML target.
Example
The following example demonstrates how JavaScript code can be included in a
<code>
tag inside a <script>
element. When this
QuickApp is rendered to a static HTML target, the JavaScript code runs and
Hello World! is displayed in a popup box in the browser.
<dynamic> <render> <static> <script> <code language_="js"> window.alert("Hello World!"); </code> </script> </static> </render> <widget class_="text" text_="Hello World Example"/> </dynamic>