2017-07-04 46 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