title: How to send value from controller to ejs without reloading page : Nodejs
body: <p>I wanna send the value from controller to ejs file without reloading page when I summit input in ejs. This is code in ejs file. </p>
  
  <pre><code>&lt;html&gt;
      &lt;p class="topicCard3"&gt;History Of PM2.5 Values ​​In &lt;%= country %&gt;&lt;/p&gt;
          &lt;form method="POST" action="/historyPM2.5"&gt;
              &lt;input class="inputCountry" name='country' placeholder="enter country name"&gt;
              &lt;button class="submitButton"&gt;SUBMIT&lt;/button&gt;
          &lt;/form&gt;
      &lt;p&gt;
  &lt;html&gt;
  </code></pre>
  
  <p>and this is code in controller.js</p>
  
  <pre><code>exports.historyPm = function(req,res) {
      country = req.body.country
      res.render('home',{
          'country': country
      })
  }
  </code></pre>
  
  <p>I need to process something in controller then send result to ejs for showing. Now, I send the value input from ejs to controller and then click summit button the page will reload.  Thank for helping.</p>