title: How to use DOM with express?
body: <pre><code>app.post('/result.html',function(req,res){
    var num1 = req.body.Num1 ;
    var num2 = req.body.Num2 ;
    var operator = req.body.Operator ;
    var result =0 ;
    switch (operator) {
      case '+':
        result = Number(num1)+Number(num2) ;
        break;
      case '-':
        result = Number(num1)-Number(num2) ;
        break;
      case '*':
        result = Number(num1)*Number(num2) ;
        break;
      default:
        result=&quot;Invalid Operator.&quot;;
    }
  
  /**/This line is giving me error..................HOW TO USE document ?????
  //*
    document.querySelector(&quot;.result&quot;).innerHTML = &quot;Result is : &quot;+result ;
  
    res.sendFile(__dirname+'/result.html');
  });
  </code></pre>
  <p>I have also included scipt tag in my result.html, but I am unable to use document with express,
  please help me , I am new to node?</p>