当前位置: 首页 > 网络学院 > 客户端脚本教程 > APPML > script

APPML
AppML HTML 报告
AppML 过滤函数
AppML HTML 列表
AppML HTML 表单
AppML XML 报告

APPML 中的 script


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 282 ::
收藏到网摘: n/a

The AppML <script> element provides a method for adding standard HTML scripts to the application.
AppML<script>元素提供了添加一个方式:将标准的HTML脚本程序添加到应用程序中。

Any legal script code can go inside the <script> element.
所有合法的脚本代码都必须写进<script>元素中。

Note: The script can be called from the <onload> sub element of <htmlform> OR be called from a field in the HTML form or list.
注意:脚本程序可以从<htmlform>的二级元素<onload>中请求,或者,从HTML表单或列表中的一个字段中请求。

Example
案例

This example will execute the JavaScript function message() when the AppML HTML form loads:
当加载AppML HTML表单时,这个案例将执行JavaScript 函数message():

<?xml version="1.0" ?>
<appml>
<database>
<connection>music_db</connection>
<sql>SELECT Title,Artist,Year FROM cd_catalog</sql>
</database>
<htmlform>
<sql>SELECT Title,Artist FROM cd_catalog</sql>
<onload>javascript:message()</onload>
<script type="text/javascript">
<!--
function message()
{
alert("This alert box was called with the onload event")
}
// -->
</script>
</htmlform>
</appml>


评论 (0) All

登陆 | 还没注册?