如何使用 javascript(无 jquery)将两个标签之间的所有标记检索到字符串中

问题描述 投票:0回答:1
javascript html
1个回答
0
投票

试试这个代码: const foo = document.getElementById("foo"); const 标记 = foo.outerHTML; 我希望这有帮助!

© www.soinside.com 2019 - 2024. All rights reserved.