//分享到新浪微博
function shareToSinaWB(event){
event.preventDefault();
var _shareUrl = 'http://v.t.sina.com.cn/share/share.php?'; //真實的appkey,必選參數
_shareUrl += '&url='+ encodeURIComponent('<%=url%>'); //參數url設置分享的內容鏈接|默認當前頁location,可選參數
_shareUrl += '&title=' + encodeURIComponent('***'); //參數title設置分享的標題|默認當前頁標題,可選參數
_shareUrl += '&source=' + encodeURIComponent('');
_shareUrl += '&sourceUrl=' + encodeURIComponent('');
_shareUrl += '&content=' + 'utf-8'; //參數content設置頁面編碼gb2312|utf-8,可選參數
_shareUrl += '&pic=' + encodeURIComponent(''); //參數pic設置圖片鏈接|默認爲空,可選參數
window.open(_shareUrl,'_blank');
}
//分享到QQ空間
function shareToQzone(event){
event.preventDefault();
var _shareUrl = 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?';
_shareUrl += 'url=' + encodeURIComponent('<%=url%>'); //參數url設置分享的內容鏈接|默認當前頁location
_shareUrl += '&showcount=' + 1; //參數showcount是否顯示分享總數,顯示:'1',不顯示:'0',默認不顯示
_shareUrl += '&desc=' + encodeURIComponent(''); //參數desc設置分享的描述,可選參數
_shareUrl += '&summary=' + encodeURIComponent(''); //參數summary設置分享摘要,可選參數
_shareUrl += '&title=' + encodeURIComponent('***'); //參數title設置分享標題,可選參數
_shareUrl += '&site=' + encodeURIComponent(''); //參數site設置分享來源,可選參數
_shareUrl += '&pics=' + encodeURIComponent(''); //參數pics設置分享圖片的路徑,多張圖片以"|"隔開,可選參數
window.open(_shareUrl,'_blank');
}
//分享到qq
function shareToqq(event){
event.preventDefault();
var _shareUrl = 'https://connect.qq.com/widget/shareqq/iframe_index.html?';
_shareUrl += 'url=' + encodeURIComponent('<%=url%>'); //分享的鏈接
_shareUrl += '&title=' + encodeURIComponent('***'); //分享的標題
window.open(_shareUrl,'_blank');
}