Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想制作一个 .js 文件,将其存储一些 html 表并将内容放在包含 .js 文件的页面上
我怎么能这样做?这可以取代一些 iframe 角色。
你在寻找innerHTMLJavascript 的标签吗?
innerHTML
像这样:-
document.getElementById('id').innerHTML = '<ol><li>html data</li></ol>';
你是这个意思?
document.body.innerHTML = '<p>Some html code</p>';