运行代码
(Shift+Enter)
HTML教程
奔月教程(runoon.com)
单击按钮获取按钮元素的文本内容
点我
注意:
Internet Explorer 8 及更早版本不支持textContent属性。
运行结果