http://community.csdn.net/Expert/topic/3752/3752466.xml?temp=.2917292 
這也是100分

解决方案 »

  1.   

    你这样试一试可以满足要求吗?
    以下是三个jsp, a.jsp  b.jsp  c.jsp
    显示a.jsp, 然后由a调用b, 再由b调用c ;这个过程基本适应你的情况a.jsp :
    <%@page contentType="text/html; charset=GB2312" %>
    <html>
    <body>
    <form name="form1" action="b.jsp">
    <input type="text" name="a1" value="12345678">
    <input type="submit" value="submit1">
    </form>
    </body>
    </html>b.jsp :
    <%@page contentType="text/html; charset=GB2312"%>
    <%String b = request.getParameter("a1");%>
    <html>
    <body onload=encrypt()>
    <script language="javascript">
    <!--
    function encrypt()
    {
        form1.b1.value = <%=b%> ^ 10101010;
    }
    //-->
    </script>
    <form name="form1" action="c.jsp">
    <input type="text" name="b1">
    <input type="submit" value="Submit2">
    </form>
    </body>
    </html>c.jsp :
    <%@page contentType="text/html; charset=GB2312"%>
    <%String c = request.getParameter("b1");%>
    <html>
    <body onload=decrypt()>
    <script language="javascript">
    <!--
    function decrypt()
    {
    form1.c1.value = <%=c%> ^ 10101010;
    }
    //-->
    </script>
    <form name="form1">
    <input type="text" name="c1">
    </form>
    </body>
    </html>
      

  2.   

    也可以这样子:
    a.jsp :
    <%@page contentType="text/html; charset=GB2312" %>
    <html>
    <body>
    <form name="form1" action="b.jsp">
    <input type="text" name="a1" value="12345678">
    <input type="submit" value="submit1">
    </form>
    </body>
    </html>b.jsp :
    <%@page contentType="text/html; charset=GB2312"%>
    <html>
    <body onload=encrypt()>
    <script language="javascript">
    <!--
    function encrypt()
    {
        form1.b1.value = <%=request.getParameter("a1")%>;
        form1.b1.value = form1.b1.value ^ 10101010;
    }function decrypt()
    {
        form1.b1.value = form1.b1.value ^ 10101010;
        return true;
    }
    //-->
    </script>
    <form name="form1" action="c.jsp">
    <input type="text" name="b1">
    <input type="submit" value="Submit2" onClick="return decrypt()">
    </form>
    </body>
    </html>c.jsp :
    <%@page contentType="text/html; charset=GB2312"%>
    <html>
    <body>
    <form name="form1">
    <input type="text" name="c1" value="<%=request.getParameter("b1")%>">
    </form>
    </body>
    </html>