1、WAP中选择下拉菜单后自动提交
<option value="<bean:write name='pb' property='pb_id'/>">
<onevent type="onpick">
<go href="<%=basePath %>wapOrder.do?method=getPM&client_id=<bean:write name='pb' property='pb_id'/>&pb_id=${pb.pb_id}&order_id=${order.order_id}&cid=$(cid<%=str%>)" method="post" accept-charset="UTF-8"></go>
</onevent>
${pb.pb_name}</option>
注:带参数的跳转需要将参数直接写到URL地址后面,在go标签中加 postfield传递参数时会传递不过去,但是在手机上使用的时候,还必须得加一个 postfield,否则他不自动跳转。
2、<onevent>的语法如下:
<onevent type="type">任务</onevent>
必选属性type的取值如表3-6所示:
表 3-6 type属性的取值
枚举值 如果用户执行了以下操作就执行任务
onpick 用户选择或不选一个<option>项时
onenterforward 用户使用<go>任务到达一个卡片时
onenterbackward 用户使用<prev>任务返回到前面的卡片时,或者按BACK按钮时
ontimer 当<timer>过期时