title: java script validation for password using array
body: <p>want to apply validation through javascript code.
  here "fpass" is the id of  textbox1</p>
  
  <pre><code> var spcl=['@','$','%','&amp;'];
   var i;
   var len=spcl.length;
  
  
  
      for(i=0;i&lt;len;i++){
      document.write(spcl[i] + " ");
      }  
          if( "%" in spcl[i]){
          document.write("good");
          }else{
          document.write("no special characters");
          }
  </code></pre>