日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

点击链接微信html代码怎么写,html5微信分享代码怎么写呢?

發布時間:2025/4/5 46 豆豆
生活随笔 收集整理的這篇文章主要介紹了 点击链接微信html代码怎么写,html5微信分享代码怎么写呢? 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

html5微信分享代碼怎么寫呢?現在很多人都在微信好友或者朋友圈分享一下內容和別的有趣的文章或圖片,但是你們知道分享的這些內容是怎樣生成的嗎?這些內容代碼是怎樣的呢?下面小編就給大家介紹一下關于 html5微信分享代碼。

html5?imgUrl = "https://www.huceo.com/logo.jpg";

html5 lineLink = "https://www.huceo.com/wdt.html";

html5 descContent = '享給朋友或朋友圈

html5?appid = ''; //apiID,可留空

function shareFriend() {

WeixinJSBridge.invoke('sendAppMessage',{

"appid": appid,

"img_url": imgUrl,

"img_width": "200",

"img_height": "200",

"link": lineLink,

"desc": descContent,

"title": shareTitle

}, function(res) {

//_report('send_msg', res.err_msg);

})

}

function shareTimeline() {

WeixinJSBridge.invoke('shareTimeline',{

"img_url": imgUrl,

"img_width": "200",

"img_height": "200",

"link": lineLink,

"desc": descContent,

"title": shareTitle

}, function(res) {

//_report('timeline', res.err_msg);

});

}

function shareWeibo() {

WeixinJSBridge.invoke('shareWeibo',{

"content": descContent,

"url": lineLink,

}, function(res) {

//_report('weibo', res.err_msg);

});

}

// 當微信內置瀏覽器完成內部初始化后會觸發WeixinJSBridgeReady事件。

document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {

// 分享給好友

WeixinJSBridge.on('menu:share:appmessage', function(argv){

shareFriend();

});

WeixinJSBridge.on('menu:share:timeline', function(argv){

shareTimeline();

});

// 分享到微博

WeixinJSBridge.on('menu:share:weibo', function(argv){

shareWeibo();

});

}, false);

通過以上的描述你是否了解html5微信分享代碼怎么寫呢?這樣如此全面、有效、簡單的恢復方法,你學會了嗎?如果你還想了解更多的話。更多更詳細微信公眾號素材內容,請持續關注微微風。

相關閱讀:

總結

以上是生活随笔為你收集整理的点击链接微信html代码怎么写,html5微信分享代码怎么写呢?的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。