在Firefox中,form.submit()无效 [英] In Firefox, form.submit() not working

查看:77
本文介绍了在Firefox中,form.submit()无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好:

使用VS2012开发,使用MVC4。我有两个网页。一个是main.aspx,另一个是parts.aspx。

main.aspx的源代码如下:

Hello:
Developed with VS2012, use MVC4. I have two web pages.one is main.aspx,the other is parts.aspx.
The main.aspx's source code as below:

<script>
frames["iframeName"].document.forms["fromImport"].submit();
..........................
</script>
<body>
<iframe src="/info/import" name="iframeName" allowtransparency="yes" frameborder="0" scrolling="no" width="100%" height="40"></iframe>
..............
</body>





parts.aspx的源代码如下:



The parts.aspx's source code as below:

<body>
<% using (Html.BeginForm("importSave", "infoSave", FormMethod.Post, new {enctype = "multipart/form-data", id = "fromImport"}))
       { %>
    <%: Html.ValidationSummary(true)%>
    .......................
    </div>
    <%} %>
</body>



在IE10和IE11中完美运行。

但它在Firefox中不起作用。

当它执行forms [fromImport]。submit()时,它不起作用。

没有异常或错误,用fireBug调试。

请帮帮我。在此先感谢。





更正了格式和/或语法问题。

添加了标签。

[/编辑]


It works perfectly in IE10 And IE11.
But it doesn't work in Firefox.
When it execute the "forms["fromImport"].submit()", it doesn't work.
There are no exception or error, while debug with fireBug.
Please help me out. Thanks in advance.


Corrected formatting and/or grammatical issues.
Added pre tags.
[/Edit]

推荐答案

以下是类似问题的解决方案:

http://stackoverflow.com/questions/22555533/form-submit-not- work-in-firefox [ ^ ]

http://stackoverflow.com / questions / 17968565 / mozilla-form-submit-not-working [ ^ ]



请尝试并告诉我们结果。
Here are the solutions for similar issue:
http://stackoverflow.com/questions/22555533/form-submit-not-working-in-firefox[^]
http://stackoverflow.com/questions/17968565/mozilla-form-submit-not-working[^]

Please try and let us know the result.


感谢您的帮助。我搜索了你提到的问题。但问题没有解决。
Thank you for your help. I have googled the issue that you mentioned.but the problem does not solve.


这篇关于在Firefox中,form.submit()无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆