Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>JSON/Atom Custom Search API Example</title>
  4. </head>
  5. <body>
  6. <div id="content"></div>
  7. <script>
  8. function hndlr(response) {
  9. for (var i = 0; i < response.items.length; i++) {
  10. var item = response.items[i];
  11. // in production code, item.htmlTitle should have the HTML entities escaped.
  12. document.getElementById("content").innerHTML += "<br>" + item.htmlTitle;
  13. }
  14. }
  15. </script>
  16. <script src="https://www.googleapis.com/customsearch/v1?key=<span class="apiparam">YOUR-KEY</span>&amp;cx=017576662512468239146:omuauf_lfve&amp;q=cars&amp;callback=hndlr">
  17. </script>
  18. </body>
  19. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement