Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 Facebook、Twitter 和 Google+ 的社交按钮,现在当用户点击这些按钮时,共享功能将在另一个窗口中打开。用户单击共享按钮后,是否可以在模式窗口中打开它?
谢谢
你有没有想过这个?我在链接中使用了点击事件。我读过这不是最佳实践,但它是我找到的最佳解决方案。
Facebook:
<a href="#" onclick=" window.open( 'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href), 'facebook-share-dialog', 'width=626,height=436'); return false;">