具有id属性的表单和具有表单属性的输入ie11问题 [英] form with id attribute and input with form attribute ie11 issue
问题描述
这仅在ie11中发生,在chrome和ie8中工作正常
我已经编写了这样的代码
<form .... id='mainform'>
<table>...</>
....
<button>....
....
</form>
<input form='mainform' ... >...
<input>
在<form>
标记之外,但除了在ie11中有效之外,其他功能都可以使用
除非我将<input>
放在</form>
之前,否则它可以在ie11中工作
奇怪的是,在ie11中,当我使用开发人员工具时,它会移动</form>
,因此输入会在</form>
之后出现,但它可以工作,但是如果我更改代码以匹配开发人员工具所说的失败 >
我做错了什么?为什么ie11不会将具有id属性的<form>
接受具有与表单id相同的form属性的<input>
?
值得注意的是,Internet Explorer的最新版本(包括11)目前不支持使用位于外部的<input />
元素上的form=""
属性. <form>
元素.
对于F12问题,这似乎是一个错误.我会让团队知道.
免责声明:我使用的是Internet Explorer
更新:我制作了jsFiddle的副本,其中删除了多余的<html>
etc元素: http://jsfiddle.net/chris123/t4zd3p2b/2/,但是我无法重现"moving </form>
"标记错误.您有精确的复制步骤吗?
This only happens in ie11, this works fine in chrome and ie8
I have code programmed like this
<form .... id='mainform'>
<table>...</>
....
<button>....
....
</form>
<input form='mainform' ... >...
The <input>
is outside the <form>
tags but it works except in ie11
unless i put the <input>
before the </form>
then it works in ie11
the odd thing is in ie11 when i use developer tools it moves the </form>
so the input comes after the </form>
except it works, but if i change the code to match what the developer tools says it fails
What am I doing wrong? why wont ie11 have a <form>
with an id attribute accept <input>
with a form attribute the same as the form id?
Of note, Internet Explorer up-to-and-including version 11 does not currently support using the form=""
attribute on <input />
elements located outside of a <form>
element.
As for the F12 issue, that looks like a bug. I'll let the team know.
Disclaimer: I work on Internet Explorer
Update I've made a copy of your jsFiddle with the extra <html>
etc elements removed: http://jsfiddle.net/chris123/t4zd3p2b/2/ however I cannot reproduce the "moving </form>
" tag bug. Do you have precise reproduction steps?
这篇关于具有id属性的表单和具有表单属性的输入ie11问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!