📅  最后修改于: 2020-10-28 05:41:17             🧑  作者: Mango
WML任务是一个元素,它指定浏览器要执行的动作,而不是要显示的内容。例如,更改为新卡的动作由
WML提供了以下四个元素来处理四个WML任务,即go任务,pre任务,refresh任务和noop taks。
顾名思义,
Attribute | Value | Description |
---|---|---|
href | URL | Gives the URL of the new card. Relative URLs are resolved relative to the current card |
method |
|
Specifies the method that should be used to fetch the deck. This must be one of the values get or post, corresponding to the GET and POST methods of HTTP. When using method=”get”, the data is sent as an request with ? data appended to the url. The method has a disadvantage, that it can be used only for a limited amount of data, and if you send sensitive information it will be displayed on the screen and saved in the web server’s logs. So do not use this method if you are sending password etc. With method=”post”, the data is sent as an request with the data sent in the body of the request. This method has no limit, and sensitive information is not visible in the URL |
sendreferer |
|
If set to true, the browser sends the URL of the current deck along with the request. This URL is sent as a relative URL if possible. The purpose of this is to allow servers to perform simple access control on decks, based on which decks are linking to them. For example, using HTTP, this attribute is sent in the HTTP Referer header. |
accept-charset | charset_list | Specifies a comma- or space-separated list of character sets that can encode data sent to the server in a POST request. The default value is “unknown”. |
class | class data | Sets a class name for the element. |
id | element ID | A unique ID for the element. |
以下是显示
Chapter 2 :
另一个示例显示如何使用Get方法上传数据
Using Get Method
另一个示例显示如何使用
Using setvar:
另一个示例显示如何使用
Using setvar:
如果以前的URL不存在,则指定
Attribute | Value | Description |
---|---|---|
class | class data | Sets a class name for the element. |
id | element ID | A unique ID for the element. |
以下是显示
Previous Page :
在
Attribute | Value | Description |
---|---|---|
class | class data | Sets a class name for the element. |
id | element ID | A unique ID for the element. |
以下是显示
Refresh this page:
此任务的唯一真正用途是与模板有关
Attribute | Value | Description |
---|---|---|
class | class data | Sets a class name for the element. |
id | element ID | A unique ID for the element. |
以下示例显示