Getting document is not defined , from document.getElementById

后端 未结 3 645
一生所求
一生所求 2020-12-10 23:09

I am learning JavaScript and I am using Atom (Text Editor). On my HTML file I got only this:




    

        
3条回答
  •  庸人自扰
    2020-12-11 00:01

    It looks like you are trying to run the JS code with the "script" package in atom (which is in a NodeJS context). What you actually want to do, is to run it in your web browser. So just open index.html in your favorite browser and see the magic :)

提交回复
热议问题