問題描述
目的是顯示一個表單,該表單將使用結果更新頁面上的 div
The aim is to show a form which will update the div on the page with the result
- 加載此 [頁面]
- 點擊鏈接顯示表格
- 提交表格
提交時,如果表單被隱藏,結果不會顯示在 div 中.
When submitting, the result does not show in the div if the form had been hidden.
添加以下答案中建議的代碼后,我顯示表單,它被提交,但數據沒有出現在 div 中我將 ajaxForm 作為目標
after adding the code suggested in the below answers, I show the form, it gets submitted, but the data is not appearing in the div I give the ajaxForm as target
[Here] 與在 div 中顯示結果的形式相同
[Here] is the same form that does show the result in the div
謝謝
推薦答案
當你提交表單時,請求被發送到服務器,你得到一個 HTTP 錯誤:405 Method Not Allowed
.
When you submit the form, the request is sent to the server and you obtain a HTTP Error: 405 Method Not Allowed
.
看起來它來自您服務器的配置.http://www.checkupdown.com/status/E405.html
It looks like it comes from the configuration of your server. http://www.checkupdown.com/status/E405.html
由于您的代碼適用于 facy.html 頁面中的示例,我認為它并不是真正來自服務器.兩個例子的區別在于表單的action.
as your code works for your example in the facy.html page I think it doesn't really comes from the server. The difference between the two examples are the action of the form.
- fancy.html:加載一個 PHP 文件
- fancy3.html:加載一個 HTML 文件
您是否嘗試將您的 thank you 頁面稱為thanks.php"并相應地修改表單的 action.我想您的服務器可能不允許 HTML 頁面上的 POST 請求.
Did you try to call your thank you page "thanks.php" and modify the action of your form accordingly. I suppose that your server might not allow POST request on an HTML page.
這篇關于jQuery插件沖突 - 請協助的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!