Advertisement
Guest User

Untitled

a guest
Apr 26th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. <html>
  2. <head>
  3. <script type="text/javascript" src="jquery.min.js"></script>
  4. <style>
  5. body {
  6. height: 120px;
  7. width: 130px;
  8. background-color: white;
  9. };
  10. </style>
  11. </head>
  12.  
  13. <body>
  14. Question Viewed:
  15. <div id="data"></div>
  16.  
  17. <script type="text/javascript">
  18.  
  19. var url = "http://stackoverflow.com/questions/1936495/website-scraping-using-jquery-and-ajax"
  20.  
  21. updateGadget();
  22.  
  23. inervalID = setInterval("updateGadget();", 60 * 1000);
  24.  
  25. function updateGadget(){
  26.  
  27. $(document).ready(function(){
  28. $("#data").load(url + " .label-value:contains('times')");
  29. });
  30.  
  31. }
  32.  
  33. </script>
  34.  
  35. </body>
  36. </html>
  37.  
  38. $(document).ready(function() {
  39. baseUrl = "http://www.somedomain.com/";
  40. $.ajax({
  41. url: baseUrl,
  42. type: "get",
  43. dataType: "",
  44. success: function(data) {
  45. //do something with data
  46. }
  47. });
  48. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement