script"

From Documentation
m (Created page with '{{ZKDevelopersReferencePageHeader}} '''Syntax:''' <script [src="''foo.js''"] [browser="ie|ie6|ie6-|ie7|ie7-|ie8|ie8-|gecko|gecko2|gecko2-|gecko3|gecko3-|gecko3.5|opera|safari"…')
 
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{ZKDevelopersReferencePageHeader}}
+
{{ZKClient-sideReferencePageHeader}}
  
 
'''Syntax:'''
 
'''Syntax:'''
Line 42: Line 42:
 
|}
 
|}
  
{{ZKDevelopersReferencePageFooter}}
+
{{ZKClient-sideReferencePageFooter}}

Latest revision as of 03:09, 3 December 2010


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

Last Update : 2010/12/03


Version Date Content
     



Last Update : 2010/12/03

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.