有人用过wmlscript吗?我按照网上的copy了一个都不能执行啊!我用open wave和wap都不能执行不知道为什么啊?
我的例子都不能执行啊?
为什么啊?
WMLScriptExample.wml
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="stuid" title="stuid:">
<do type="accept" label="Results">
<go href="WMLScriptExample.wmls#checkid($(stuid))"/>
</do>
<p>
Enter Stu_ID: <input type="text" name="stuid"/>
</p>
</card>
<card id="Results" title="Results:">
<p>
You entered:<br/>
Stu_ID: $(stuid)<br/>
</p>
</card>
</wml>
WMLScriptExample.wmls
extern function checkid(stuid)
{
if (String.length(stuid) != 8)
{
alert("Error Long");
WMLBrowser.setVar("stuid", "Error: String must be 8 digits long.");
}
WMLBrowser.go("WMLScriptExample.wml#Results");
};