简易一键分享到QQ空间
生活随笔
收集整理的這篇文章主要介紹了
简易一键分享到QQ空间
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
html 代碼
<!DOCTYPE html> <html lang="en"> <head><meta charset="UTF-8"><title>Title</title> </head> <body> <button style="font-size:24px;" id="btn">分享到QQ空間</button><script>var ShareTip = function () {}//分享到騰訊微博ShareTip.prototype.sharetoqq = function (content, url, picurl) {var shareqqstring = 'http://v.t.qq.com/share/share.php?title=' + content + '&url=' + url + '&pic=' + picurl;window.open(shareqqstring, 'newwindow', 'height=500,width=600,top=100,left=100');}//分享到新浪微博ShareTip.prototype.sharetosina = function (title, url, picurl) {var sharesinastring = 'http://v.t.sina.com.cn/share/share.php?title=' + title + '&url=' + url + '&content=utf-8&sourceUrl=' + url + '&pic=' + picurl;window.open(sharesinastring, 'newwindow', 'height=400,width=400,top=100,left=100');}//分享到QQ空間ShareTip.prototype.sharetoqqzone = function (title, url, picurl) {var shareqqzonestring = 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?summary=' + title + '&url=' + url + '&pics=' + picurl;window.open(shareqqzonestring, 'newwindow', 'height=400,width=400,top=100,left=100');}var share = new ShareTip();document.getElementById('btn').onclick = function () {share.sharetoqqzone("這是一本關于地圖故事的集錦,以一本書的形式來展示地圖故事,我們可以使用鼠標拖動來翻頁,或者點擊翻頁按鈕,點擊 馬上體驗,可以體驗故事,同時在觸屏上也有很好的體驗效果奧,地圖故事,盡在書中,趕快體驗吧,建議使用對 HTML5支持較好的瀏覽器", "http://tm.arcgisonline.cn:8038/App101/MapstoryBook/Default.html", "http://tm.arcgisonline.cn:8038/App101/MapstoryBook/css/Img/ShareBook.jpg");}; </script> </body> </html>當然還有一個更好用的分享工具 BShare
BShare
html 代碼
總結
以上是生活随笔為你收集整理的简易一键分享到QQ空间的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 这个冬季没有雪
- 下一篇: 专题详解-5G接入控制(1)