javascript – linkedin按钮动态渲染

如何以动态方式呈现linkedin按钮?例如在/ share’>< / script>中写入“< script type ='在运行时或页面加载完成后.我已经测试了写入它,或者使用 jquery将其附加在body标签中,但是它不起作用.
我会感谢任何帮助.谢谢.

解决方法

任何人仍然想知道如何做到这一点,你加载你的
<script type="IN/Share"></script> //Don't forget other attributes

只需在你的javascript中调用IN.init(),它将渲染按钮.

开发人员指南会说明使用未记录的功能,但这个论坛在开发者网站上发布:

https://developer.linkedin.com/forum/3-problems-share-button

如Eugene O’Neill(网站开发者LinkedIn)所述,

1) IN.Parse() and IN.Init() are here to stay. While we do employ the policy that any undocumented methods may or may not be supported indefinitely,these two are uniquely crucial to the functionality of the framework. The amount of work it would require to remove IN.Parse()… I don’t even want to think about it ;). IN.Init() is our preferred method for loading the framework asynchronously and won’t be going anywhere. Feel free to use either method.

相关文章

前言 做过web项目开发的人对layer弹层组件肯定不陌生,作为l...
前言 前端表单校验是过滤无效数据、假数据、有毒数据的第一步...
前言 图片上传是web项目常见的需求,我基于之前的博客的代码...
前言 导出Excel文件这个功能,通常都是在后端实现返回前端一...
前言 众所周知,js是单线程的,从上往下,从左往右依次执行,...
前言 项目开发中,我们可能会碰到这样的需求:select标签,禁...