title: How to call a webservice method from an html page [javascript] with out refresh the page
body: <p>I have a <code>webservice</code> which will return a value. Here my requirement is, I need to call that <code>webservice</code> from an <code>index.html</code> page, that page have an html submit button. On that button click I am calling a <code>JavaScript.</code> From there I want to call the web method. how can I achieve this.</p>
  
  <p>My webservice is <code>"localhost/ws/service.asmx";</code> and  web method is <code>HelloWorld</code></p>
  
  <pre><code> &lt;input type="button" value="Submit" id="btn_submit" onclick ="return fun()"&gt;
  
   function fun() {
  
  
      // here  I want to call the "helloworld" method.
      return true;
  }
  </code></pre>