日期:2014-05-17  浏览次数:20755 次

java WAP界面元素取值问题,来者又分!
代码中第二个form中action后面的loid我如何动态取到第一个form中loid的值?用$(loid)在用opera在电脑模拟手机测试的时候是可以正常取到第一个form中的loid输入的值的(且是即时获取的),但在手机上就不能解析《$(loid)》了,传到后台是以 $(loid) 的字符串传过去的。有高手给解答下,有更好的解决办法没!
HTML code

<%@ page language="java" contentType="text/vnd.wap.wml; charset=GBK" pageEncoding="GBK"%>
<%@taglib prefix="s" uri="/struts-tags"%> 
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <style type="text/css">
   </style>
</head>
<body>
    <fieldset style="width:98%">
        <form id="worksheetForm" action="<s:url value='/NetCutover/base/WorkSheet!query.action'/>" method="post">
            <table class="querytable" style="width:100%;text-align:center" >
                <tr><td class="title_1" colspan="2">业务查询</td></tr>
                <tr>
                    <td class="title_2" style="width:40%">SN:
                        <input id="loid" type="text" name="loid" value=""/>
                    </td>
                </tr>
                <tr>
                    <td class="title_1" style="text-align:right;">
                        <input type="submit" value="查    询"/>
                    </td>
                </tr>
            </table>
        </form>
        <table class="querytable" style="width:100%;text-align:center;" >
            <tr>
                <td style="text-align:right;">
                    <form action="<s:url value='/NetCutover/base/WorkSheet!query.action?loid='/>$(loid)" method="post">
                        <table style="width:100%;text-align:center" >
                            <tr>
                                <td class="title_1" style="text-align:center;">
                                    <input type="submit" value="设备重置"/>
                                </td>
                            </tr>
                        </table>
                    </form>
                </td>
            
            <tr>
                <td colspan="7" style="text-align:center;width:100%">
                    <s:property value="operResult"/>
                </td>
            </tr>
        </table>
    </fieldset>
</body>
</html> 



------解决方案--------------------
不会 顶一下吧 想知道怎么弄
------解决方案--------------------
我现在是这样实现的, 总共一个form 有n个submit ,都提交到本页面,然后为每个submit标示不同得值,提交到本页面时获取submit值,根据submit值在forward不同得action,进行相应处理。这个做法很简单。
------解决方案--------------------
。 接分