title: how to set datalist selected value in a field using javascript.?
body: <pre><code>&lt;datalist id="SelectEntityPrimaryNames"&gt; //datalist contains list of country
      &lt;option id="1" value="india"&gt;&lt;/option&gt;
      &lt;option id="2" value="US"&gt;&lt;/option&gt;
      &lt;option id="3" value="Canada"&gt;&lt;/option&gt;
  &lt;/datalist&gt;
  
  &lt;input type="text" class="form-control" id="SelectEntityPrimaryName" style="width: 75%;" placeholder="Title"list="SelectEntityPrimaryNames" /&gt;
  
  $("#SelectEntityPrimaryName").val()
  </code></pre>
  
  <p>how can I get the value which is already selected in datalist through jquery</p>