title: Why am I getting a "Cannot read property 'nodeType' of null" error with Knockout JS?
body: <p>Today is the first day for me in Knockout . Got struck with it . Below is my first sample code using knockout.js and it shows an error .</p>
  
  <blockquote>
    <p>Cannot read property 'nodeType' of null </p>
  </blockquote>
  
  <p>Here is my script:`</p>
  
  <pre><code>   function ViewModel()  
     {  
       var self = this;  
       self.n1 = ko.observable(10);  
       self.n2 = ko.observable(10);  
       self.n3 = ko.observable(10);  
     }  
     ko.applyBindings(new ViewModel());  `
  </code></pre>
  
  <p>Here is my html:</p>
  
  <pre><code>&lt;body&gt;
  &lt;p&gt;Number1:&lt;input data-bind="value:n1"&gt;&lt;/input&gt;&lt;/p&gt;
  &lt;p&gt;Number2:&lt;input data-bind="value:n2"&gt;&lt;/input&gt;&lt;/p&gt;
  &lt;p&gt;Number3:&lt;input data-bind="value:n3"&gt;&lt;/input&gt;&lt;/p&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>I want to know the reason for the above error and how to overcome it...</p>