Skip to content Skip to sidebar Skip to footer

How Can I Solve Document Is Not Defined Error?

I am getting this error I thought I would be because of the node.js but I am not sure of it. How can I solve it ? [Running] node 'c:\Users\Lenovo\Desktop\projectjs\index.js' c:\Use

Solution 1:

Your JavaScript is designed to be embedded in an HTML document, loaded by a <script> element and executed by a web browser.

It is not designed to run in Node.js which isn't centred around documents at all.

Open the HTML document in a web browser. It already has a <script> element.

Post a Comment for "How Can I Solve Document Is Not Defined Error?"