使用Ajax +的表单操作不在IE中工作 [英] Form Action using Ajax+Not working in IE
问题描述
简而言之:
如何使用javascript更改表单操作属性值并且还需要在IE中支持?
简介:
我使用ajax函数提交表单。
我也在改变行动使用java脚本动态地使用它的形式。它在FF中正常工作。但是我得到的错误是对象不支持这个属性或方法。在IE中
我发现此行中出现错误
document.forms.FORMNAME.action =" hhtp://www.google.com" ;
这用于更改表单的动作网址。
我还有其他几个选项,比如
文件。 FORMNAME.action,
document.getElementById(''FORMNAME'')。action.value。
但在IE中没有任何工作。
请帮助我。
Hi ,
In short:
How to change the form action attribute value using javascript and that need to supported in IE also ?
BRIEF:
I am using ajax function to submit the form.
I am also changing the action of the form tdynamically using java script.Its is working fine in FF.But i am getting the ERROR as "object doesn''t support this property or method" in IE
I found that Error is occured in this line
document.forms.FORMNAME.action = "hhtp://www.google.com"
This is used to change the action url of my form.
I have this few other options like
document.FORMNAME.action ,
document.getElementById(''FORMNAME'').action.value .
But nothing working in IE.
Please help me.
推荐答案
你的表单中是否有任何名为action的字段?
Have you got any fields named action in your form?
是的,有一个隐藏的操作字段。但我删除了那个字段,即使我收到了错误。
还有其他原因吗?
@acoder
Yes there is an hidden action field .But i removed that field too even i am getting the error.
Is there any other reason?
@acoder
发布您的表单HTML代码。
Post your form HTML code.
这篇关于使用Ajax +的表单操作不在IE中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!