script
From Documentation
Revision as of 02:00, 3 December 2010 by Tomyeh (talk | contribs) (moved ZK Developer's Reference/Widget Package Descriptor/script to ZK Client-side Reference/Widget Package Descriptor/script)
Syntax:
<script [src="foo.js"] [browser="ie|ie6|ie6-|ie7|ie7-|ie8|ie8-|gecko|gecko2|gecko2-|gecko3|gecko3-|gecko3.5|opera|safari"]>
The script element is used to specify an external JavaScript file, or to embed the JavaScript code directly.
Example,
<script src="a.js"/>
<script>
function doIt() {
}
</script>
src
[Optional]
The path of an external JavaScript file. It is suggested to use a path related to the directory of the WPD file. For example,
<script src="abc.js"/>
<script src="../foo/def.js"/>
browser
[Optional]
It specifies the condition to embed the specified JavaScript file. For example, if browser="ie6-"
is specified, the JavaSript file is embeded only if the client is Internet Explorer 6. For the available types you could check, please refer to Servlets.isBrowser(ServletRequest, String).
Version History
Version | Date | Content |
---|---|---|