Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. getData:function (target_url) {
  2. var jqXHR = $.ajax({
  3. url:target_url,
  4. type: "Get",
  5. async: false,
  6. success: function (data) {
  7. return data
  8. }
  9. ,
  10. error : function(jqXHR, textStatus, errorThrown) {
  11. if(jqXHR.status == 404 || errorThrown == 'Not Found')
  12. {
  13. jqXHR.responseText="There was a 404 error";
  14.  
  15.  
  16. }
  17. }
  18. });
  19.  
  20. var result=this.getData("www.xxx.com");
  21.  
  22. alert(result);
  23.  
  24. a='123'
  25. b='456'
  26. c='789'
  27.  
  28. var cookies = document.cookie.split('; ');
  29. cookies.forEach(function(cookie){
  30. var cookie = cookie.split('=');
  31. // print them to console
  32. console.log('key : ' + cookie[0] + ' value : ' + cookie[1]);
  33. // or use as per the need
  34. });
  35.  
  36. var Cookie = $.getCookie("key");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement