如何从html中删除#shadow-root(user-agent)

如何从html中删除#shadow-root(user-agent),第1张

概述什么是#shadow-root(用户代理)?如何从文本框中删除它?详细地这是我的代码:<input type='text' name='pincode' class='form-control frm_pincode' value='' /> 但是当我检查它时,我看到了<input type='text' name='pincode' cl

什么是#shadow-root(用户代理)?如何从文本框中删除它?

详细地
这是我的代码:

但是当我检查它时,我看到了

最佳答案从本质上讲,它封装了代码,使其更易于管理.如果不使您生成的代码功能无法使用,那么您不一定要删除它.

以下是您正在使用的库隐藏的代码,因此您不必担心编码某些对象. Chrome允许您查看代码中#shadow Doms的位置.

  #shadow-root (user-agent)  

从以下链接查看此说明:

“In a nutshell Shadow DOM is a new part of the HTML spec which allows
developers to encapsulate their HTML markup,CSS styles and
JavaScript. Shadow DOM,along with a few other technologIEs which
we’ll cover later,gives developers the ability to build their own 1st
class Tags and APIs just like the or tag.
Collectively,these new Tags and APIs are referred to as Web
Components.”

以下链接是帮助理解影子DOM的关键:
http://robdodson.me/blog/2013/08/26/shadow-dom-introduction/

这样可以使用shadow DOM来创建自定义标记:
https://www.polymer-project.org/

最后,Chrome开发工具选项下还有一个选项“显示用户代理阴影DOM”

总结

以上是内存溢出为你收集整理的如何从html中删除#shadow-root(user-agent)全部内容,希望文章能够帮你解决如何从html中删除#shadow-root(user-agent)所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1121986.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-29
下一篇2022-05-29

发表评论

登录后才能评论

评论列表(0条)