Firefox太早自动关闭HTML元素-IE和Chrome确定 [英] Firefox automatically closing an HTML element too early - IE and Chrome OK

查看:66
本文介绍了Firefox太早自动关闭HTML元素-IE和Chrome确定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以告诉我为什么Firefox通过添加</form>来早关闭表单吗?它将在提交"按钮之前很早关闭表单-因此表单将不会提交.

Can anyone tell me why Firefox would close a form early by adding a </form>? It closes the form well before the submit button - so the form then won't submit.

此表单的整个代码有点长,无法在此处发布.它可以在Chrome和IE上正常运行,但是Firefox似乎会尽早关闭表单,并删除以后的</form>.

The whole code for the form is a bit long to post here. It works fine in Chrome and IE, but Firefox seems to close the form early and removes the later </form>.

正在从PHP输出html.不确定是否会有所作为?

The html is being output from PHP. Not sure if this would make a difference?

在Firebug中编辑也不起作用.任何想法表示赞赏.

Editing in firebug doesn't work either. Any ideas appreciated.

谢谢

推荐答案

当浏览器意外关闭表单或div时,通常是因为代码中存在某种错误-如关闭div而不是打开div.

When a browser closes a form or div unexpectedly, it's usually because there's some kind of mistake in the code - like a closing div instead of an opening one.

我建议您将代码提供给 w3c验证程序,并修复错误.

I suggest you feed your code to the w3c Validator, and fix the errors.

这篇关于Firefox太早自动关闭HTML元素-IE和Chrome确定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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