HTML中代码为:
aaaa
获取的js代码:
方法一:.innerText
var x1 = document.getElementById("testid").innerText;
alert("x1="+x1);
方法二:.innerHTML
var x2 = document.getElementById("testid").innerHTML;
alert("x2="+x2);