阅读背景:

我可以在document.getElementById()中使用字符串变量吗?

来源:互联网 

here is my code:

这是我的代码:

function figureSelector () {
    document.getElementById("rook").onclick = function  () {
        curr = '"rook"';
    };
};

function moveLine(){
    document.getElementById("upButton").onclick = function() { 
            document.getElementById(curr).style.top = document.getElementById(curr).offsetTop - getPix() * 62  + "px"; 
            counter= counter + getPix();
    }; 
function figureSel



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: