当前位置: 首页 > 网络学院 > XML相关教程 > WAP > <refresh>
The <refresh> task refreshes some specified card variables. If any of the variables are shown on the screen, this task also refreshes the screen.
<refresh>是用于刷新指定的卡片变量的。如果变量并为出现在屏幕上,那么执行该任务将刷新屏幕。
Note: The <refresh> tag can be nested inside an <anchor>, <do>, or <onevent> tag.
注意:<refresh>标签可以被嵌套在一个<anchor>、<do>或<onevent>标签中。
<refresh> ..<setvar>.. </refresh> |
属性 | 值 | 描述 |
---|---|---|
class | cdata | Sets a class name for the element. The class name is case sensitive. An element can be connected to multiple classes. Multiple class names within the class attribute are separated by white space 为元素设置一个类名称。类名称是字母大小写不敏感的。一个元素可以被连接到多个类中。类属性中的多个类名称是通过空白符进行分隔的 |
id | id | Sets a unique name for the element 为元素设置一个独立的名称 |
The example below uses an <anchor> tag to add a "Refresh this page" link to the card. When the user clicks on the link, he or she refreshes the page and the value of the variable x will be set to 30: <?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card> <p> <anchor> Refresh this page <go href="thispage.wml"/> <refresh> <setvar name="x" value="30"/> </refresh> </anchor> </p> </card> </wml> |