搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

the JS statement document.getElementsByName("PME_data_myfield").item(0).outerHTML=""; is not executed in FF, it works on all other browsers

  • 1 个回答
  • 10 人有此问题
  • 4 次查看
  • 最后回复者为 cor-el

more options

I am trying to remove an input element from a form with the above statement in a javascript. It works on all other browsers but not on FF. It does not generate an error either. Instead of removing the item it just seems to be ignoring the statement.

I remove the element with the above statement and then re create a new one with document.createElement. In FF it duplicates the element.

I am trying to remove an input element from a form with the above statement in a javascript. It works on all other browsers but not on FF. It does not generate an error either. Instead of removing the item it just seems to be ignoring the statement. I remove the element with the above statement and then re create a new one with document.createElement. In FF it duplicates the element.

所有回复 (1)

more options

Firefox only supports innerHTML and not outerHTML, so you need to use other code for Firefox.

See e.g.:

由cor-el于修改