良乡网站建设,所见即所得型网页制作工具,通州免费网站建设,网站关键词库是怎么做的在最近的开发者工具更新中#xff0c;Teams提供了一个Share to Teams的能力#xff0c;就是在你的网页上面#xff0c;放置一个按钮#xff0c;用户点击后#xff0c;就可以很方便地将当前网页或者你指定的其他网页#xff0c;分享到Teams好友或频道中。这个开发文档在这… 在最近的开发者工具更新中Teams提供了一个Share to Teams的能力就是在你的网页上面放置一个按钮用户点击后就可以很方便地将当前网页或者你指定的其他网页分享到Teams好友或频道中。这个开发文档在这里请参考 https://docs.microsoft.com/en-us/microsoftteams/platform/share-to-teams这个功能非常好欢迎大家试用。另外我因为长期有写博客的习惯我也顺便改造了一下博客的系统添加了这个按钮。点击该按钮后会弹出一个对话框在这个对话框中可以选择分享的目标然后还可以添加说明文字然后点击“共享”按钮此时如果切换到Teams就可以看到已经有一个消息分享过来看起来还不错吧还等什么呢赶紧在你的网站中添加这个功能吧。文末福利我的博客是在博客园写的如果你正好也是在这个平台你可以通过我写好的下面的代码快速添加。 style .divblock { padding: 10px; margin-bottom: 10px; margin-top: 10px; margin-right: 10px; border: #c0c0c0 1px dashed; text-align: left; display: table-cell; }
/style script document.getElementById(green_channel).setAttribute(class,divblock); let sharebutton document.createElement(div); sharebutton.setAttribute(data-href, window.location.href); sharebutton.setAttribute(class, divblock teams-share-button);
sharebutton.setAttribute(data-msg-text,分享好文章); document.getElementById(blog_post_info).insertBefore(sharebutton, document.getElementById(green_channel));
/script script async defer srchttps://teams.microsoft.com/share/launcher.js
/script请进入你的博客管理后台进入“设置”页面然后在“博客侧边栏公告”里面粘贴上面的代码即可。