为什么调用函数javascript时边框不改变?

为什么调用函数javascript时边框不改变?,javascript,Javascript,为什么调用函数javascript时边框不改变 由于打字错误,withrdaw与退出不一样 function check_withdraw_format() { alert("TEsT"); document.getElementById("withdraw").style.border = "1px solid red"; } 首先,学习如何调试代码 在这种情况下很容易:只需打开控制台,您就会看到 TypeError: document.getElementById(...

为什么调用函数javascript时边框不改变


由于打字错误,withrdaw退出不一样

function check_withdraw_format() {
    alert("TEsT");
    document.getElementById("withdraw").style.border = "1px solid red";
}

首先,学习如何调试代码

在这种情况下很容易:只需打开控制台,您就会看到

TypeError: document.getElementById(...) is null
问题是你使用


document.getElementById(“withrdaw”)

OH使用RDAW更改以撤销^
TypeError: document.getElementById(...) is null