<button onclick="ShareToLinkedin()" style="cursor:pointer">分享领英</button>
function ShareToLinkedin() { var _href = "https://www.linkedin.com/shareArticle?mini=true"; _href += "&title=" + document.title;//标题 _href += "&url=" + Escape(window.location.href);//链接 window.open(_href); } function Escape(url) { url = url.replace(/=/g, "%3D");//"""转义 url = url.replace(/&/g, "%26");//"&"转义 return url; }