如何在提交按钮上放置推文按钮的功能?

时间:2016-03-10 10:36:50

标签: javascript jquery html twitter

This is my site.

在页面底部,有一个推文按钮和一个提交按钮。

我想要做的是将推文按钮的功能放在提交按钮上,然后删除推文按钮。

NSArray *objectsToShare = @[textToShare, myWebsite];

UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil];

NSArray *excludeActivities = @[UIActivityTypeAirDrop,
                               UIActivityTypePrint,
                               UIActivityTypeAssignToContact,
                               UIActivityTypeSaveToCameraRoll,
                               UIActivityTypeAddToReadingList,
                               UIActivityTypePostToFlickr,
                               UIActivityTypePostToVimeo];

activityVC.excludedActivityTypes = excludeActivities;

[self presentViewController:activityVC animated:YES completion:nil];

1 个答案:

答案 0 :(得分:0)

我的查询现已解决。这就是我所做的。

html

                    <img type="image" src="images/submit-button.png" id="sharesubmit" >

JS

$("#sharesubmit").click(function() {
    console.log('WOOOO');
    window.open("http://twitter.com/intent/tweet?text=" + escape($('#comment').val() + " https://www.buddreambig.ie/ #DreamBig"), "twitter", "toolbar=0,status=0,width=548,height=325");
});