title: validation of input text field in html using javascript
body: <pre><code>&lt;script type='text/javascript'&gt;   
  function required()  
  {
      var empt = document.forms["form1"]["Name"].value; 
      if (empt == "")  
      {  
          alert("Please input a Value");  
          return false;  
      }  
  }  
  &lt;/script&gt; 
  
  &lt;form name="form1" method="" action=""&gt;
  &lt;input type="text" name="name" value="Name"/&gt;&lt;br /&gt;
  &lt;input type="text" name="address line1" value="Address Line 1"/&gt;&lt;br /&gt;
  </code></pre>
  
  <p>I have more than one input text field, each having their default value. Before I submit the form I have to verify whether all fields are filled. So far i got the javascript to check for null since different text boxes have different default value. How can I write a javascript to verify that user has entered data? I mean, the script must identify that input data is other than default and null.</p>