Pull in News from Yahoo API Using JSON HTML


/ Published in: HTML
Save to your folder(s)

The simple form that calls the searchYahoo function.


Copy this code and paste it in your HTML
  1. <!DOCTYPE html
  2. PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  7. <meta name="keywords" content="" />
  8. <meta name="description" content="" />
  9. <title>Javascript Testing</title>
  10.  
  11. <!-- CSS Links -->
  12. <link rel="stylesheet" href="css/ajax.css" type="text/css" media="screen" />
  13.  
  14. <!-- Scripts Here -->
  15. <script src="js/global.js" type="text/javascript"></script>
  16. <script src="js/yahoo.js" type="text/javascript"></script>
  17.  
  18. </head>
  19. <body>
  20. <h1>Yahoo Search</h1>
  21. <form onsubmit="searchYahoo(this.query.value); return false" action="">
  22. <label for="">Search For</label>
  23. <input type="text" name="query" id="query" />
  24. <input type="submit" value="Search" />
  25. </form>
  26. <div id="results"></div>
  27. </body>
  28. </html>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.