首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

一个表单向另一个表单submit后,提示HTTP 异常 405 - 禁止访问资源

2012-04-01 
一个表单向另一个表单submit后,提示HTTP 错误 405 - 禁止访问资源提交submit的表单submit.jsp如下:JScript

一个表单向另一个表单submit后,提示HTTP 错误 405 - 禁止访问资源
提交submit的表单submit.jsp如下:

JScript code
<html><head></head><script language="javascript"><!--function compute(){    return true;}--></script><BR>send the Length and Width to calculate.jsp throught click submit<form name="form2" target="myWindowName" action="calculate.jsp" method="post" onSubmit="compute()"><br>Lenght:<input type="text" name="Len" value="30" size="5"><br>Width:<input type="text" name="Width" value="30" size="5"><p><input type="submit" name="mysubmit" value="submit"></p></form></body></html>


接收的表单calculate.jsp如下:
JScript code
 <html> 
<head> </head>
<script language="javascript">
<!--
function compute(Len,Width){
var SquarArea;
SquarArea=Len*Width;
document.write("WindowName="+window.name+" <br>");
document.write("get Len="+Len+" <br>");
document.write("get Width="+Width+" <br>");
document.write("SquarArea="+SquarArea);
}
-->
</script>
<body>
get length and width from onsubmit.jsp <br>
<form name="123" action="" method="post">
<input type="button" name="button1" value="calculate" onClick="compute( <%=request.getParameter("Len")%>, <%=request.getParameter("Width")%>)">
</form>
</body>
</html>


[解决办法]
可能是服务器的配置问题,这个我不太清楚

热点排行