乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      選中后分享到微博的js代碼

       四兩哥 2012-08-28
      <!-- 選中后分享到微博 -->
      <style>
      .img_sina_share{display:none; position:absolute; cursor:pointer;}
      .img_qq_share{display:none; position:absolute; cursor:pointer;}
      </style>
      
      <img id="imgSinaShare" class="img_sina_share" title="將選中內容分享到新浪微博" src="http://www./sj/images/share.gif" />
      <img id="imgQqShare" class="img_qq_share" title="將選中內容分享到騰訊微博" src="http://www./sj/images/weiboicon32.png" width="26" height="26" />
      
      <script>
      var eleImgShare = document.getElementById("imgSinaShare");
      var eleImgShare2 = document.getElementById("imgQqShare");
      var artMain = document.getElementById("artMain");
      
      var $miniBlogShare = function(eleShare,eleShare2,eleContainer) {
          var eleTitle = document.getElementsByTagName("title")[0];
          eleContainer = eleContainer || document;
          var funGetSelectTxt = function() {
              var txt = "";
              if(document.selection) {
                  txt = document.selection.createRange().text;    // IE
              } else {
                  txt = document.getSelection();
              }
              return txt.toString();
          };
          eleContainer.onmouseup = function(e) {
              e = e || window.event;
              var txt = funGetSelectTxt(), sh = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
              var left = (e.clientX - 40 < 0) ? e.clientX + 20 : e.clientX - 40, top = (e.clientY - 40 < 0) ? e.clientY + sh + 20 : e.clientY + sh - 40;
              if (txt) {
                  eleShare.style.display = "inline";
                  eleShare.style.left = left + "px";
                  eleShare.style.top = top + "px";
                  eleShare2.style.display = "inline";
                  eleShare2.style.left = left + 30 + "px";
                  eleShare2.style.top = top + "px";
              } else {
                  eleShare.style.display = "none";
                  eleShare2.style.display = "none";
              }
          };
          eleShare.onclick = function() {
              var txt = funGetSelectTxt(), title = (eleTitle && eleTitle.innerHTML)? eleTitle.innerHTML : "未命名頁面";
              if (txt) {
                  window.open('http://v.t.sina.com.cn/share/share.php?title=' + txt + '&url=' + window.location.href);    
              }
          };
          eleShare2.onclick = function() {
              var txt = funGetSelectTxt(), title = (eleTitle && eleTitle.innerHTML)? eleTitle.innerHTML : "未命名頁面";
              if (txt) {
                  window.open( 'http://v.t.qq.com/share/share.php?title=' + txt + '&url=' + window.location.href);    
              }
          };
      }(eleImgShare,eleImgShare2,artMain);
      
      </script>
      <!-- 選中后分享到微博 end -->

        本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內容均由用戶發(fā)布,不代表本站觀點。請注意甄別內容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權內容,請點擊一鍵舉報。
        轉藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多