Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getData:function (target_url) {
- var jqXHR = $.ajax({
- url:target_url,
- type: "Get",
- async: false,
- success: function (data) {
- return data
- }
- ,
- error : function(jqXHR, textStatus, errorThrown) {
- if(jqXHR.status == 404 || errorThrown == 'Not Found')
- {
- jqXHR.responseText="There was a 404 error";
- }
- }
- });
- var result=this.getData("www.xxx.com");
- alert(result);
- a='123'
- b='456'
- c='789'
- var cookies = document.cookie.split('; ');
- cookies.forEach(function(cookie){
- var cookie = cookie.split('=');
- // print them to console
- console.log('key : ' + cookie[0] + ' value : ' + cookie[1]);
- // or use as per the need
- });
- var Cookie = $.getCookie("key");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement