title: CSS applied on submit button not working after submitting
body: <p>I have a submit button on a form that submits the form on a php.page. I also added an onclick event on the submit button that changes it's opacity through javascript. The problem now is when I click the submit button, it changes it's opacity, the form is submitted, and after submission the button's opacity is back to 100% again. I want the opacity attribute remains on the button even after submitting the form. Check out my codes below:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function fadebtn(){
  document.getElementById('submitbtn').style.opacity="0.4";
  }
  &lt;/script&gt;
  
  &lt;form method="post"&gt;
  &lt;input type="submit" value="Submit" id="submitbtn" name="submitbtn"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>UPDATE: I fixed it now. Check the updated codes above and additional codes below.</p>
  
  <pre><code>&lt;?php
  if(isset($_POST['submitbtn']))
  { 
  echo '&lt;script type="text/javascript"&gt;'
  , 'fadebtn()'
  , '&lt;/script&gt;';
  }
  </code></pre>