怎可以在Windows 7 sidebar用jquery + rss?
simply don't work
....- <!DOCTYPE html>
- <html>
- <head>
- <title>Hong Kong Weather</title>
-
-
- <script src="./jquery-1.8.3.js"></script>
- <script src="./jquery.rss.js"></script>
- <style type="text/css">
- body
- {
- font-family: verdana;
- font-weight: bold;
- font-size: 1em;
- background-color: white;
- color: brown;
- width: 120px;
- height: 70px;
-
-
- }
-
- span
- {
- background-color: white;
- color: brown;
- }
- </style>
-
-
- <script>
-
- function getWeather()
- {
- jQuery( function($) {
- $("#rss-feeds").rss("http://rss.weather.gov.hk/rss/SeveralDaysWeatherForecast_uc.xml", {
- entryTemplate: "{title} {body}",
- tokens: {
- body: function(entry, tokens)
- {
- // tokenize the entry, for example, use a html parser
- // to break down the first <br></br>
- return entry.content;
- }
- }
- })
- })
- }
-
- // Get weather in every 30 minutes (1800 seconds * 1000) = 1800000 milliseconds
- setInterval("getWeather()", 1800000);
- </script>
- </head>
-
- <body onLoad="getWeather();">
- <span id="rss-feeds">
- </span>
- </body>
- </html>
複製代碼 |
|