document.getElementById("div"+i).style.display = "bl在chrome中 不能用?

document.getElementById(div+i).style.display bl在chrome中 不能用?JScript codedocument.getEleme

document.getElementById("div"+i).style.display = "bl在chrome中 不能用?

JScript code
document.getElementById("div"+i).style.display = "block";


这个在ie中正常 但是在chrome下 无效


[解决办法]
w3c标准的浏览器自定义属性要使用getAttribute获取
JScript code
function yc_xs(o) {        var btn = o.value; ////var j = o.j;  var j = o.getAttribute('j');      //////////        if (btn == "显示答案") {            document.getElementById(o.id).value = "隐藏答案";            document.getElementById("div" + j).style.display = "block";        } else {            document.getElementById(o.id).value = "显示答案";            document.getElementById("div" + j).style.display = "none";        } }