SHARE
TWEET

Untitled

a guest Jul 20th, 2017 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript" src="Testing_Ajax.js"></script>
  2. <script type="text/javascript" src="jquery-1.5.js"></script>
  3.  
  4. <script type="text/javascript">
  5.     $(document).ready(function(){
  6.         $("div").addClass('cls_display');
  7.         $("input.cls_post").click(function(){
  8.             $.post("Display_Ajax.php",{username: "john", password: "abcd"});               
  9.         });    
  10.     });
  11. </script>
  12. <style>
  13.     .cls_display{
  14.         background-color: green;
  15.     }
  16. </style>
  17.  
  18. <form name="nm_form" method="POST" action="Display_Ajax.php">
  19.     <table>    
  20.         <tr><td>User Name:</td><td><input type="text" name="nm_username" id="id_username"/></td></tr>
  21.         <tr><td>Password:</td><td><input type="text" name="nm_password" id="id_password"/></td></tr>
  22.         <tr><td><input type="button" value="Submit" onclick="runAjax()"/></td></tr>
  23.         <tr><td><input type="button" class="cls_post" value="Submitforajax"/></td></tr>
  24.     </table>
  25.     <div id="id_display" class="cls_display">
  26.        
  27.     </div>
  28. </form>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top