The script component is used to specify the script codes running at the browser. Notice that, unlike zscript, the script codes are running at the browser. They are usually written in JavaScript which is supported by the most of browsers. The simplest format is as follows.
<zk> <window id="win" > <button label="change color" onClick='Clients.evalJavaScript("myfunc()")'/> </window> <script type="text/javascript"> function myfunc() { $e("${win.uuid}").style.backgroundColor = "blue"; } </script> </zk>
Property |
Description |
Data Type |
---|---|---|
|
Sets whether the button (on the right of the textbox) is visible. |
|
|
Sets the content of the script element. |
|
|
Sets whether to defer the execution of the script codes. |
|
|
Sets the URI of the source that contains the script codes. |
|
|
Sets the type of this client script. |
|
Methods