Guest User

Untitled

a guest
Dec 14th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. function GoogleCallback(jqueryObj, data) {
  2. console.log('data', data);
  3. }
  4.  
  5. $(function () {
  6. $.ajax({
  7.  
  8. url: 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0?key=*ТУТ КЛЮЧ*&q=PHP&callback=GoogleCallback&context=?',
  9. dataType: "jsonp",
  10. error: function() {
  11. console.log(':(((');
  12. }
  13. });
  14.  
  15. });
  16.  
  17. /* callback */
  18. GwebSearch.RawCompletion('0', null, 400, 'invalid version', 200)
  19.  
  20. function googleSearch(e){
  21. $.ajax({
  22. url:'https://ajax.googleapis.com/ajax/services/search/web?v=1.0&rsz=large&q='+e+'&callback=GoogleCallback&context=?',
  23. dataType: 'jsonp'
  24. });
Add Comment
Please, Sign In to add comment