📌  相关文章
📜  javascript 获取标签之间的内容 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:32.658000             🧑  作者: Mango

代码示例2
// Using ES2015+ fat-arrow-function syntax
const getTextOfElement = () => {
  const element = document.getElementById('elementId'); // Get desired HTML element
  console.log(element.textContent); // Get text of element & display in console 
}