form提交后,提示"网页无法显示.. HTTP 405 - 资源被禁止",怎么回事? 请求帮助!谢谢

zlpvicky 2007-03-07 07:01:09
bank.htm文件的地址为:http://localhost/test/bank1.htm
在bank1.htm文件中有: <form name="formbill" action="bank2.htm" method="post" ID="Form1" target="_self" >
按了sumit按钮提交后,转不到bank2.htm上,而是显示:

网页无法显示
网页地址不正确,因此您要寻找的网页无法显示。

HTTP 405 - 资源被禁止
Internet 信息服务

而实际上bank2.htm是存在的,用http://localhost/test/bank2.htm访问是可以
打开的。

不知道怎么回事。从前没用过form来提交数据



...全文
956 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
lgue 2007-03-09
  • 打赏
  • 举报
回复
孟子E章 2007-03-07
  • 打赏
  • 举报
回复
这是因为iis里没有.htm的映射,默认只允许get.要 post,则按照下面的做法添加映射

Go to "Control Panel"-"Administrative Tools"-"Internet Information Services".
Expand the tree to "COMPUTERNAME"-"Web Sites"-"Default Web Site".
Right-click on "Default Web Site" and select "Properties". (Alternately, select "Default Web Site" and press Alt+Enter.)
Select the "Home Directory" tab.
Click the "Configuration" button.
From the "Mappings" tab, select the "Add" button.
Click the "Browse..." button, choose "Dynamic Link Libraries *.dll" from the "Files of Type" dropdown, and select c:\WINDOWS\System32\inetsrv\asp.dll.
Type ".html" (without quotes) in the "Extension" box.
Select the "Limit to:" radio button, and type in "GET, POST" (without quotes) in the box next to it.
Click the "OK" button and close all the dialogs. (If the "OK" button is greyed out, then make sure all the entries are correct and try clicking in the file name box.)


参见
http://www.somacon.com/p126.php
zbjg 2007-03-07
  • 打赏
  • 举报
回复
form应该是不可以提交到一个静态页面的,
如果你的页面全部是静态的,那么你可以用<form id="Form1s" method="post" action="test.htm" onsubmit="location.href='bank2.htm';">试一下
yurongsheng 2007-03-07
  • 打赏
  • 举报
回复
有用.htm来处理表单数据的吗,
换个别的动态页面
或是改成get提交试试
zlpvicky 2007-03-07
  • 打赏
  • 举报
回复
在线等待。。。。。。。。

61,112

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧