📜  textcontent javascript代码示例

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

代码示例2
// to change the text displayed by a HTML element, you can access the textContent property
element.textContent = "some text";
// some elements like textareas and inputs have a value instead of textContent
element.value = "some text";
// you can get said element through its element
document.getElementById("element id");