gpt4 book ai didi

javascript - Safari 删除表单标签

转载 作者:行者123 更新时间:2023-11-28 01:11:49 24 4
gpt4 key购买 nike

Safari 正在从backbone.js 应用程序的 DOM 中删除开始和结束表单标记的第一个实例。 insideHTML 不受影响! Firefox 对我的代码没有任何问题并且运行完美。使用下划线将代码从脚本/模板文件插入到 DOM 中。

<form id="i-get-removed" action="#">
<div>This content here does not get removed no matter what!!!</div>
</form>

<form id="I-do-not-get-removed-but-I-would-if-the-above-form-was-not-there" action="#">
.
</form>

以下是容器渲染后 Safari Web 检查器显示的内容:

<div>This content here does not get removed no matter what!!!</div>

<form id="I-do-not-get-removed-but-I-would-if-the-above-form-was-not-there" action="#">
.
</form>

我对此感到非常兴奋 - 如果我愿意的话,我无法想象有什么方法可以实现这一点。如果您能深入了解这种疯狂行为,我将不胜感激!

最佳答案

嵌套在表单中的表单会在 Safari 中导致此行为。

关于javascript - Safari 删除表单标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24338115/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com