到底怎么修改啊, JavaScript [17:27:44.014] TypeError: document.getElementById(...) is null

2025-05-12 13:22:53
推荐回答(1个)
回答(1):





《新衣服(书坊)》



onload = function ()
    {
    var x;
    if (!!(x = document.getElementById ("abc")))
    {
    alert (x);
    }
    else
    {
    alert ("x is:" + x);
    }
    }