Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>LazyLoad</title>
- <meta charset="UTF-8">
- <meta name="description" content="Jquery demo">
- <meta name="keywords" content="HTML,CSS,XML,JavaScript">
- <meta name="author" content="John Doe">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link rel="stylesheet" href="style.css">
- <script type="text/javascript" src="js/jquery.js"></script>
- <style>
- body = {margin:0; padding:0}
- .container {margin: 10px;}
- </style>
- <script>
- $(window).ready(function(){
- $( "input" ).click(function(e){
- e.preventDefault();
- var szoveg = $('#szoveg').val();
- $.post('feldolgozo.php', {szoveg:szoveg}, function(response){
- var obj = JSON.parse(response);
- $('#banner').text(obj.newdata);
- });
- });
- });
- </script>
- </head>
- <body>
- <div class="container">
- <div id="banner">
- </div>
- <br>
- <form action="feldolgozo.php" method="post">
- <input type="text" name="szoveg" id="szoveg" value="sss">
- <input type="submit" value="Submit" name="submit">
- </form>
- <p id="kimenet">s</p>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement