在网页之间传输数据

时间:2011-07-17 08:52:07

标签: javascript html struts2

我有一个带有表单的页面,并且表单中包含一个选择,可以启用多个选择:

<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <meta content="text/html; charset=utf-8" http-equiv="Content-type">
    </head>
    <body>
        <form action="xx.action">
            1:name:<input type="text" name="user.name"/>  
            childs:<select multiple="multiple" name=user.childs.name>
                <option value="01">01xxx</option>
                <option value="02">02eee</option>
            </select><br/>
            2:name:<input type="text" name="user.name"/>  
            childs:<select multiple="multiple" user.childs.name>
                <option value="01">01xxx</option>
                <option value="02">02eee</option>
            </select>
        </form>
    </body>
</html>

在示例中,“childs”将向服务器提交多个项目。

现在由于项目太多,所以我希望用户在新页面中选择项目:

<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <meta content="text/html; charset=utf-8" http-equiv="Content-type">
    </head>
    <body>
        <form action="xx.action">
            1:name:<input type="text" name="user.name"/>
            childs:<input type="text" />
            <input type="button" value="choose childs" />
            <br/>
            2:name:<input type="text" name="user.name"/>  
            childs:<input type="text" />
            <input type="button" value="choose childs" />
        </form>
    </body>
</html>

但是我无法在前一页显示的新页面中选择结果。

我知道window.opener,但是如何将用户的结果发送到服务器?

0 个答案:

没有答案