[英]Customized twitter button with pop-up
這是我的Twitter按鈕有效的代碼:
var tweeturl = 'http://twitter.com/share?url=' + encodeURI(window.location) +'&via=MyTwitterUserName&text=The editable text I want to include automatically in the tweet';
// Place the text on the page. Change body to wherever you want the button placed.
$('div[data-role="footer"] > div').append('<a id="mycustomtwitterbutton" href=" ' + tweeturl + ' "><img src="/Content/images/share_twitter.jpg"></a>')
我有一個簡單的問題。
我想將鏈接作為彈出對話框而不是在新頁面中打開,並且當我單擊“確定”以確認鏈接的推文時,它會在我的應用程序中返回。
你能幫助我嗎 ?
謝謝
很難確切地知道沒有更多代碼您想做什么,但是彈出窗口的javascript版本如下。
var actwin=window.open(location,'mywindow',
'width=706,height=630,status=no,location=no,menubar=no,scrollbars=no,resizable=yes');
actwin.focus();
這是一條用於確認消息的JavaScript代碼。
var x=window.confirm("Question?");
if (x){
///code
}
else{}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.