http://community.csdn.net/Expert/topic/3752/3752466.xml?temp=.2917292
這也是100分
這也是100分
解决方案 »
- 求算法
- 关于facebook的接口开发
- struts中怎样在一个表单内设置多个提交按钮,提交给Action类中的不同方法?
- struts2.0的配置问题啊,帮忙来看看啊,谢谢了!
- 怎么在ireport中建立CustomDataSource
- http表头设如何置文件发送者
- 为什么我用(new java.util.Date()).getYear()得到的值是105,我看过了系统的当前时间是2005年呀
- 请问如何获得上一级网页的链点?
- 带日期和时间的DATE怎么加相并得出DATE格式的?
- 请问怎用ssh动态加载extjs tree
- page指令的contentType属性
- 请明确,详细的说说url与uri的区别,尤其是在jsp开发中,我的概念很模胡,谢谢啦!
以下是三个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>
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>