$(function() { $('.weixinicon').attr( 'data-qrcode', 'http://www.xinhongru.com/qrcode/qrcode.php?content=' + window.location.href ) //娴嬭瘯 //$(".weixinicon").attr("data-qrcode","/qrCode/Index.aspx?url="+window.location.href); //姝e紡鐢ㄨ繖涓紝宸茬粡鏇存柊鍒板悗鍙 //鍒嗕韩 //寰崥 $('.share_wb').click(function() { var url = $(this).data('txt') var url = window.location.href var title = document.title var op = 'http://service.weibo.com/share/share.php?title=' + title + '&url=' + encodeURIComponent(url) + '' window.open(op) }) //QQ $('.share_qq').click(function() { var url = $(this).data('txt') var url = window.location.href var title = document.title var op = 'http://connect.qq.com/widget/shareqq/index.html?url=' + encodeURIComponent(url) + '' window.open(op) }) $(".share_qqkj").click(function () {//qqkongjian var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?title=" + title + "&url=" + encodeURIComponent(url) + ""; window.open(op) }) //璞嗙摚 $('.share_db').click(function() { var url = $(this).data('txt') var url = window.location.href var title = document.title var op = 'https://www.douban.com/share/service?href=' + encodeURIComponent(url) + '&title=' + title + '' window.open(op) }) $(".share_bd").click(function () {//鐧惧害璐村惂 var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "http://s.share.baidu.com/mshare?url=" + title + "&url=" + encodeURIComponent(url) + ""; window.open(op); }) //棰嗚嫳 $(".share_ly").click(function () {//棰嗚嫳 var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "https://www.linkedin.com/shareArticle?mini=true" + title + "&url=" + encodeURIComponent(url) + ""; window.open(op); }) $('.weixinicon').click(function() { //寰俊 var url = $(this).attr('data-qrcode') //alert(url) var title = '' title += "
" title += "x" title += '

浜岀淮鐮?/h2>' title += "
" title += '

鎵竴鎵?/p>' title += '

' $('body').remove('.weixin') $('body').append(title) }) $(document).on('click', '.weixin .c', function() { $('.weixin').remove() }) })