index.html
XML/HTML Code复制内容到剪贴板
- …
- <link rel="import" href="x-component.html">
- </head>
- <body>
- <x-component>
- <h1>This is Custom Element</h1>
- </x-component>
- …
注意,因为x-component.html 中的document 对象跟index.html的一样,你没必要再写一些棘手的代码,它会自动为你注册。
支持的浏览器
本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。
ctvol管理联系方式QQ:251552304
本文章地址:https://www.ctvol.com/htm5ctutorials/473492.html