- //first php
- <html>
- <head>
- <script>
- $(document).ready(function (){
- $("#red").load("http://localhost/pros/cons.php");
- $("#blue").keypress(function(e){
- if(e.which === 13){
- alert("berhasil");
- }
- });
- $("#green").keypress(function(e){
- if(e.which === 13){
- alert("OK");
- }
- });
- });
- </script>
- </head>
- <body>
- <input id="blue" type="text"/>
- <div id="red"></div>
- </body>
- </html>
- //cons.php
- <input type="text" id="green"/>
id="green" on cons.php on enter not work..