Safari 中带有按钮的 DOM 问题
我想知道以前是否有人见过这个问题。
我的网页上有两个按钮。 当我离开页面并点击后退按钮返回时,一个按钮的值将放置在另一个按钮的值中。
例如,
<input class="SmallData" type="submit" id="logButton" value="Log In" tabindex="93"></input>
<input class="btn" type="submit" id="acBtn" value="Detailed Quote"></input>
当我返回页面时,“详细报价”取代了“登录”,例如,
<input class="SmallData" type="submit" id="logButton" value="Detailed Quote" tabindex="93"></input>
没有 JavaScript 导致发生这种情况。 我查看源代码,一切看起来都很好,但我检查 DOM,我可以看到有一个不同的值。
当使用后退按钮时,web kit 如何处理 dom 是否会被损坏?
谢谢,
I was wondering if anyone has seen this issue before.
I have two button on a webpage. When I navigate away from the page and hit the back button to return the value of one button is placed in the value of the other.
E.g
<input class="SmallData" type="submit" id="logButton" value="Log In" tabindex="93"></input>
<input class="btn" type="submit" id="acBtn" value="Detailed Quote"></input>
When I come back to the page Detailed Quote replaces Log In e.g.
<input class="SmallData" type="submit" id="logButton" value="Detailed Quote" tabindex="93"></input>
There is no JavaScript causing this to happen. I look at the source everything looks fine but I inspect the DOM I can see that the there is a different value.
Is there something about how web kit handles the dom that it gets corrupted when the back button is used?
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试给每个输入元素一个 name="some_unique_name" 属性 - 看看这是否有助于 Safari 区分。
Try giving each input element a name="some_unique_name" attribute -- see if that helps Safari differentiate.
可能是因为有两个提交按钮......?
只是我的“随机”建议......:)
Mght it be because of having two submit buttons...?
Just my "random" suggestion though... :)
检查 Chrome 中是否发生同样的情况(如果您可以访问 Windows 盒子),看看是 WebKit 问题还是 Safari 本身问题。
Check if the same thing happens in Chrome (if you have access to a Windows box) to see if it's a WebKit issue or Safari itself.