使用JSON HTML从Yahoo API中获取新闻

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用JSON HTML从Yahoo API中获取新闻相关的知识,希望对你有一定的参考价值。

The simple form that calls the searchYahoo function.
  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>

以上是关于使用JSON HTML从Yahoo API中获取新闻的主要内容,如果未能解决你的问题,请参考以下文章