请WEB前台的大神帮忙看看,这段代码兼容问题。 for (i = 0; i < lis.length; i++) {o = document.getElementById("d" + i );试试 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 参考: Plain Text vs innerText vs textContent不用管document.allfunction innerText(node) { return node.textContent || node.innerText;} <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><script type="text/javascript">window.onload=function(){ function innerText(o) { return document.all ? o.innerText : o.textContent; } alert(innerText(document.getElementById('test')));}</script></head><body><div id="test">123</div></body></html>没问题阿 关于js刷新时间的问题 ,请大家指教下,谢谢 求使用jqgrid所需要的js和css文件(要完整的)Email:[email protected] 求一组正则表达式javascript的 一个不是问题的问题 firefox的firebug面板被禁用,下三角也点不开了 看看啊 送分咯 一个非常棘手的问题,个人感觉超难,提供思路就有分 问一个比较白痴的问题,想不起来。了 急问网页动态查询问题(100分马上结帐!) [急啊] 如何判断javascript中变量值为null,对象或变量是否为undefined? SCRIPT5: 拒绝访问 怎么让竖向滚动条位置保持不变
不用管document.allfunction innerText(node) {
return node.textContent || node.innerText;
}
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">
window.onload=function(){
function innerText(o) {
return document.all ? o.innerText : o.textContent;
}
alert(innerText(document.getElementById('test')));
}
</script>
</head><body>
<div id="test">123</div>
</body>
</html>没问题阿