JavaScript 可以从 Yahoo 加载 RSS XML 提要吗? ?
是否允许客户端JS访问第三方域名?
最佳答案
您可以使用我的博文 Unwritten guide to Yahoo Query Langauge 中概述的技术
您可以使用如下 yql 语句查询 XML 数据表:
select * from xml
where url="http://path/to/xml
然后,您将使用 src http://query.yahooapis.com/v1/public/yql?q={your yql here} 在 html 中添加脚本标签(可以使用 document.createElement('script') 完成) &format=json&callback={your function here} 其中 {your yql here} 替换为你的 yql statment 的 URI 编码版本。
关于javascript - JavaScript 可以从第三方域加载 XML 数据吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/660774/