title: passing php value as parameter
body: <p>I want to pass php variable as parameter in onblur event.2nd parameter is not passed to the function.
  Here I attached my code.</p>
  
  <pre><code>echo "&lt;p&gt;Email&lt;input type=text name=email id=email size=18 maxlength=50 required onblur='javascript:myFunction(this.value,".$fet['email'].");' value='".$email."' &gt;&lt;/p&gt;";
  </code></pre>
  
  <p>script</p>
  
  <pre><code>       &lt;script&gt;
           function myFunction(em,a) {
           alert(a);
         if(em!='')
        {     
       var x = document.forms["profile"]["email"].value;
       var atpos = x.indexOf("@");
       var dotpos = x.lastIndexOf(".");
       if (atpos&lt;1 || dotpos&lt;atpos+2 || dotpos+2&gt;=x.length) {
       alert("Not a valid e-mail address");
       document.getElementById("email").value = "";
       return false;
       exit();
       }
           }                }
         &lt;/script&gt; 
  </code></pre>