<!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>
<title>js兼容IE火狐360的取值方法!</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
</head>
<body>
<div id="sum2" style="display:none">10000333</div> <!-- 对这行取值 -->
<script>
if(navigator.appName.indexOf("Explorer")>-1)
vartext=document.getElementById("sum2").innerText;
else
vartext=document.getElementById("sum2").textContent;
document.write(vartext);
</script>
</body>
</html>