title: How to alert the value of textbox
body: <p>I am trying to alert the value one of textbox of form in JavaScript but its not working and my other forms have same code of JavaScript they are working fine. I have spent lot of time to fix this issue but not succeed.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;script&gt;
          function call(){
              var siv=document.getElementById("siv")‌​.value;
              alert(siv);
          }
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;form  name="alm" action="#" method="post" onSubmit="call();"&gt;
              &lt;label&gt;Province: &lt;/label&gt;&lt;br&gt;
              &lt;select name="ProvinceDropDown" id="ProvinceDropDown"&gt;
                  &lt;option value="SelectProvince"&gt; Please Select &lt;/option&gt;
                  &lt;option value="Sindh" selected='selected'&gt; Sindh &lt;/option&gt;
              &lt;/select&gt;
              &lt;input type="text" value=""  id="siv" name="siv"&gt;
              &lt;input type="submit" value="submit" &gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;  
  </code></pre>