var _title, _source, _sourceurl, _pic, _showcount, _desc, _summary, _site, _url = location.href, _pic = location.href; function sharetosinawb(event) { event.preventdefault(); var _shareurl = 'http://v.t.sina.com.cn/share/share.php?title="123"'; //真实的appkey,必选参数 _shareurl += '&url=' + encodeuricomponent(_url || document.location); //参数url设置分享的内容链接|默认当前页location,可选参数 _shareurl += '&title=' + encodeuricomponent(_title || document.title); //参数title设置分享的标题|默认当前页标题,可选参数 _shareurl += '&source=' + encodeuricomponent(_source || ''); _shareurl += '&sourceurl=' + encodeuricomponent(_sourceurl || ''); _shareurl += '&content=' + 'utf-8'; //参数content设置页面编码gb2312|utf-8,可选参数 _shareurl += '&pic=' + encodeuricomponent(_pic || ''); //参数pic设置图片链接|默认为空,可选参数 window.open(_shareurl, '_blank'); } var url = document.url; // jquery('#code').qrcode({ // render: "canvas", //也可以替换为table // width: 100, // height: 100, // text: url // });