我用rss显示器javascript解析feed。这是正文中的脚本:
<script type="text/javascript">
//USAGE SYNTAX: new rssdisplayer("divid", "rssurl", numberofitems, "displayoptions")
new rssdisplayer("voorpagina", "http://news.google.nl/news?pz=1&cf=all&ned=nl_nl&hl=nl&topic=h&output=rss", 15, "")
</script>
有没有办法在_blank设置目标??? 谢谢。
答案 0 :(得分:0)
如果我理解正确RssDisplayer通过您传递给它的参数创建HTML视图。例如,如果你打电话
new rssdisplayer("voorpagina", "http://news.google.nl/newspz=1&cf=all&ned=nl_nl&hl=nl&topic=h&output=rss", 15, "")
它必须产生这样的东西:
<a href="http://news.google.nl/newspz=1&cf=all&ned=nl_nl&hl=nl&topic=h&output=rss">voorpagina</a>
<hr/>
<a href="http://news.google.nl/m1.html">news 1</a>
<a href="http://news.google.nl/m2.html">news 2</a>
<a href="http://news.google.nl/m3.html">news 3</a>
但你需要:
<a href="http://news.google.nl/newspz=1&cf=all&ned=nl_nl&hl=nl&topic=h&output=rss">voorpagina</a>
<hr/>
<a href="http://news.google.nl/m1.html" TARGET="_blank">news 1</a>
<a href="http://news.google.nl/m2.html" TARGET="_blank">news 2</a>
<a href="http://news.google.nl/m3.html" TARGET="_blank">news 3</a>
我看到了三种方法: