单击提交按钮后将文本插入文本框
问题描述:
我在Dreamweaver CS4中工作,并有一个联系表格。我正在使用PHP发送信息。我有一个禁用的文本框,我想用它来显示联系表单是成功发送还是失败。单击提交按钮后,如何向此禁用的文本框发送成功或失败消息?在此先感谢!
I am working in Dreamweaver CS4 and have a contact form. I am using PHP to send the info. I have a disabled textbox that I want to use to display whether the contact form was sent successfully or failed. How would I send a success or failure message to this disabled textbox after the submit button is clicked? Thanks in advance!
答
Dreamweaver只是一个编辑器,对你将要做的事情没有任何影响。为什么使用文本框进行表单反馈?为什么您希望在同一页面中完成此操作?
您的表单处理是使用AJAX在服务器端还是客户端执行?
Dreamweaver is just an editor and has no effect on what you will be doing. Why are you using a text box for form feedback? And why do you expect this to be done in the same page?
Is your form processing performed purely server-side or client-side with AJAX?
一个使用伪代码的简单示例
A simple example using pseudo code
展开 | 选择 | Wrap | 行号
我认为你打算放置禁用。作为属性的元素内部,而不是它的外部。
OP表示文本框始终*被禁用。我只想让他解释他想要完成的事情,因为我以前从未见过他的方法论。
I think you meant to place "disabled" inside of the element as an attribute, not outside of it.
And OP said the textbox is *always* disabled. I''d just like for him to explain what he is trying to accomplish, as I have never seen his methodology before.