Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $(document).ready(function(){
- getMessages();
- });
- var getMessages = function(){
- $.get("/guestbook", function(data, status){
- console.log(data);
- console.log("status=" + status);
- renderMsgs(data);
- });
- };
- var renderMsgs = function(msgs){
- $(msgs).each( function(index, msg){
- console.log("index=" + index);
- console.log(msg);
- });
- };
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement