求  js分享功能  可带视频,文字分享的JavaScript视频分享

解决方案 »

  1.   

    植物大战僵尸 下载地址:http://download.csdn.net/detail/veryhunger/5290788 
    智能伸展分享
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    </head>
    <body > 
    <div id="divId" style="background:#f00; height:1000px; overflow:hidden;">
        <div style="height:1500px;"></div>
    </div>
    <script type="text/javascript">
        window.onscroll = function () {
            var a = document.documentElement.scrollTop == 0 ? document.body.clientHeight : document.documentElement.clientHeight;
            var b = document.documentElement.scrollTop == 0 ? document.body.scrollTop : document.documentElement.scrollTop;
            var c = document.documentElement.scrollTop == 0 ? document.body.scrollHeight : document.documentElement.scrollHeight;
      
      
            if (b != 0) {
                if (a + b == c) {
                    showmore();
                }
            }
        }
        function showmore() {
            //alert($('#divId div:last-child').offset().top + parseInt($('#divId div:last-child').height()));
            if(parseInt($('#divId').height()) < ($('#divId div:last-child').offset().top + parseInt($('#divId div:last-child').height()))) {
                $('#divId').css('height', '+=100px');
            }
             
            }
    </script>
      
      
    </body>
    </html>
    jquery滚动分享
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>CSS等高布局</title>
    <style type="text/css">
    body { margin:0; padding:0; }
    ul,li { margin:0; padding:0; }
    ul li { float:left; width:100px; }
    ul { list-style:none; float:left; width:300px; }
    #box { width:300px; overflow:hidden; position:relative; background:#f00; height:100px; }
    #boxframe { width:600px; position:absolute; top:0; }
    </style>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript">
    function scrolls() {
        if(parseInt($('#boxframe').css('left')) == -300) { 
            $('#boxframe').css('left', 0)
        }
       $('#boxframe').animate({left: '-=100px'}, 500);
    }
    var timer;
    $(function() {
        $('ul').clone().appendTo('#boxframe');
        timer = setInterval('scrolls()', 2000);   
        $('#boxframe').hover(function() {
            clearInterval(timer);                         
        }, function() {
            timer = setInterval('scrolls()', 2000);   
        });
    });
    alert(a);
    </script>
    </head>
    <body>
    <div id="box">
        <div id="boxframe">
            <ul>
                <li><a href="#" target="_blank"><img src="1.jpg" width="100" height="100" /></a></li>
                <li><a href="#" target="_blank"><img src="2.gif" width="100" height="100" /></a></li>
                <li><a href="#" target="_blank"><img src="3.gif" width="100" height="100" /></a></li>
            </ul>
             
        </div>
    </div>
    </body>
    </html> 
      

  2.   


    多谢大侠,可是我是想要的js分享功能,是分享到微博,QQ空间时,分享的内容可以是视频,文字。。