我正在尝试从 bbc.com 阅读 rss 提要。我成功地从 bbc.com 阅读了 ess。但是当我从本地计算机读取 RSS 时.. 找不到 RSS...我的代码在这里...
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Weather</title>
<link>local://localhost/ali/WeatherApp/</link>
<description>Weather Update Website</description>
<item>
<title>Entry Title</title>
<link>Link to the entry</link>
<guid>http://example.com/item/123</guid>
<pubDate>Sat, 9 Jan 2010 16:23:41 GMT</pubDate>
<description>[CDATA[ This is the description. ]]</description>
</item>
</channel>
</rss>
而Jquery代码是
<link href="jquerymobile/jquery.mobile-1.3.1.css" rel="stylesheet" type="text/css"/>
<link href="zrssfeed/jquery.zrssfeed.css" rel="stylesheet" type="text/css" />
<script src="jquerymobile/jquery.js" type="text/javascript"></script>
<script src="jquerymobile/jquery.mobile-1.3.1.js" type="text/javascript"></script>
<script src="jquery.zrssfeed.min.js" type="text/javascript"></script>
<script src="zrssfeed/jquery.zrssfeed.min.js" type="text/javascript"></script>
<script type="text/javascript">
var selectVal="";
$(document).ready(function () {
//var conceptName = $('#select_menu :selected').text();
//$('#select_menu').change(function() {
// assign the value to a variable, so you can test to see if it is working
// selectVal = $('#select_menu :selected').val();
//alert(selectVal);
//});
//var conceptName = $("select_menu").filter(":selected").val();
$("#Submit").click(function(){
selectVal = $('#select_menu :selected').val();
if(selectVal=='New York')
{
$('#test').rssfeed('http://demo.sslwireless.com/apk/rss.xml');
}
else if(selectVal=='London')
{
$('#test').rssfeed('http://open.live.bbc.co.uk/weather/feeds/en/2643743/observations.rss');
}
else if(selectVal=='Moscow')
{
$('#test').rssfeed('http://open.live.bbc.co.uk/weather/feeds/en/524901/observations.rss');
}
else if(selectVal=='Tokyo')
{
$('#test').rssfeed('http://open.live.bbc.co.uk/weather/feeds/en/1850147/observations.rss');
}
//alert(selectVal);
});
});
</script>
有人可以帮忙吗??