iframe内容出现在我的RSS Feed中

时间:2015-12-09 09:46:10

标签: javascript html css iframe rss

"溢出iFrame"我相信一切都不相关。我的网站iframe循环显示给定的网址。我的RSS也会显示iFrame内容,这意味着我没有RSS和2个重复的iFrame?为什么这样,请帮助我。我在我的网站上创建了一个新页面来测试它们一起工作。我附上了代码。我是网络开发的初学者,请放心。谢谢!

<!DOCTYPE html>
<html>

<head>

    <!--needed by default I think-->
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <!-- CSS Style-->

    <style type="text/css">

        #container
        {
        width: 1652px; /* width of whole site page*/
        height: 100%;
        }

        #body
        {
        float: left;
        width: 1272px;
        height: 650px;
        }

    </style>

    <!--Code for styles and iFrame formatting configurations-->
    <style type="text/css">

        #content_iframe{
        width:65%; /* width of iframe % calculates pixel width*/
        display: block;
        border: #000000 0px solid;
        margin: 0;
        padding: 0;
        background-color: white;
        height:600px; /* height of iframe*/
        }

        iframe {
        -moz-transform: scale(0.65, 0.65); 
        -webkit-transform: scale(0.65, 0.65); 
        -o-transform: scale(0.65, 0.65);
        -ms-transform: scale(0.65, 0.65);
        transform: scale(0.65, 0.65); 
        -moz-transform-origin: top left;
        -webkit-transform-origin: top left;
        -o-transform-origin: top left;
        -ms-transform-origin: top left;
        transform-origin: top left; }

    </style>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <script type="text/javascript" charset="utf-8">

        var sites = [
        "http://news.sky.com/",
        "http://www.bbc.co.uk/news",
        "https://uk.news.yahoo.com/"
        ];

        <!--Notice: Last URL doesnt use a "," Below - 7000 is the timing interval between each URL-->       

        var currentSite = sites.length;
        $(document).ready(function () {
        var $iframe = $("iframe").attr("src","https://uk.news.yahoo.com/");
        setInterval(function() {
        (currentSite == 0) ? currentSite = sites.length - 1 : currentSite = currentSite -1;
        $iframe.attr("src",sites[currentSite]);
        }, 7000);
        });

    </script>

    <!-- start sw-rss-feed code --> 
    <script type="text/javascript"> 
    <!-- 
    rssfeed_url = new Array(); 
    rssfeed_url[0]="http://www.surfing-waves.com/newsrss.xml";                               
    rssfeed_url[1]="http://feeds.bbci.co.uk/news/rss.xml?edition=uk";
    rssfeed_url[2]="http://feeds.skynews.com/feeds/rss/world.xml";  
    rssfeed_frame_width="180"; 
    rssfeed_frame_height="250"; 
    rssfeed_scroll="on"; 
    rssfeed_scroll_step="6"; 
    rssfeed_scroll_bar="off"; 
    rssfeed_target="_blank"; 
    rssfeed_font_size="12"; 
    rssfeed_font_face=""; 
    rssfeed_border="on"; 
    rssfeed_css_url=""; 
    rssfeed_title="on"; 
    rssfeed_title_name=""; 
    rssfeed_title_bgcolor="#3366ff"; 
    rssfeed_title_color="#fff"; 
    rssfeed_title_bgimage="http://"; 
    rssfeed_footer="off"; 
    rssfeed_footer_name="rss feed"; 
    rssfeed_footer_bgcolor="#fff"; 
    rssfeed_footer_color="#333"; 
    rssfeed_footer_bgimage="http://"; 
    rssfeed_item_title_length="50"; 
    rssfeed_item_title_color="#666"; 
    rssfeed_item_bgcolor="#fff"; 
    rssfeed_item_bgimage="http://"; 
    rssfeed_item_border_bottom="on"; 
    rssfeed_item_source_icon="off"; 
    rssfeed_item_date="off"; 
    rssfeed_item_description="on"; 
    rssfeed_item_description_length="120"; 
    rssfeed_item_description_color="#666"; 
    rssfeed_item_description_link_color="#333"; 
    rssfeed_item_description_tag="off"; 
    rssfeed_no_items="0"; 
    rssfeed_cache = "537052bb44e6cebe5e94e39e974e6723"; 
    //--> 
    </script> 

    <script type="text/javascript" src="http://feed.surfing- waves.com/js/rss-feed.js"></script>  
<!-- end sw-rss-feed code -->

</head>
<body>
<div id="body">
<h1> Test Environment </h1>

    <br>
    <br>
        <iframe id="content_iframe" name="content_iframe"></iframe>

    </div>
</body>

`

0 个答案:

没有答案