标签:
//获dom对象的innerText的取值 function getInnerText(element) { //判断当前浏览器是否支持innerText if(typeof element.innerText === "string") { //支持返回innerText return element.innerText; }else{ //不支持返回textContent return element.textContent; } };
//获dom对象的innerText的取值 function getInnerText(element) { //判断当前浏览器是否支持innerText if(typeof element.innerText === "string") { //支持返回innerText return element.innerText; }else{ //不支持返回textContent return element.textContent; } };
标签:
原文地址:http://www.cnblogs.com/lcf1314/p/5578969.html