2017-07-04 66 views
-1

我有这个代码https://codepen.io/anon/pen/YQLdLg,我想给弹出窗口分享我想要的大小,更小和居中。现在它打开一个完整的窗口。Twitter分享按钮在全窗口打开

我尝试过onclick="window.open(this.href,width=400,height=250);return false;,但无法使其工作。

+0

这个PHP如何? –

+0

对不起,我是初学者。你知道如何使这个精确的代码与更小的新窗口一起工作吗?谢谢! – rid

+0

没关系。很高兴你得到了答案。 –

回答

1

演示:https://codepen.io/kumarrishikesh12/pen/VWxgbY


的Facebook

<a href="https://www.facebook.com/sharer/sharer.php?u=http://www.example.com/" id="facebookurl" name="fb_url" target="_blank" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"> 

Linkdin

<a href="http://www.linkedin.com/shareArticle?mini=true&url=http://www.example.com/&title=myexample" id="linkedinurl" name="linkedin_url" target="_blank" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"> 

叽叽喳喳

<a href="https://twitter.com/intent/tweet?text=Check%20out%20my%20new%20webpage%21&via=example&url=http://www.example.com" id="twitternurl" name="twitter_url" target="_blank" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"> 

<p data-height="265" data-theme-id="0" data-slug-hash="VWxgbY" data-default-tab="js,result" data-user="kumarrishikesh12" data-embed-version="2" data-pen-title="Add share popup to links" class="codepen">See the Pen <a href="https://codepen.io/kumarrishikesh12/pen/VWxgbY/">Add share popup to links</a> by Rishikesh kumar (<a href="https://codepen.io/kumarrishikesh12">@kumarrishikesh12</a>) on <a href="https://codepen.io">CodePen</a>.</p> 
 
<script async src="https://production-assets.codepen.io/assets/embed/ei.js"></script>

+0

谢谢,非常感谢 – rid

+0

@rid ...你的'twitter'分享模型在这里.. https://codepen.io/kumarrishikesh12/pen/eRrxLx –

+0

你是伟大的,RïshïKêshKümar! – rid