点击 ajax,Ajax模拟点击

有人可以通过Ajax告诉我这是否可行。我想将一个外部网站加载到页面上,然后使用jQuery,jScript,php或某些方法来模拟我刚刚加载的外部网站页面上的点击。

该网站不允许传统的帖子/获取

//

function FriendCenterObject() {

var fcAction = function(actionUrl, gamerTag, responseHandler) {

responseHandler = responseHandler || function(response) {

if (response.status != 0) {

DisplayMessageDialog('Error', response.view, 'Close', null, MessageLevelType.Error);

}

else {

DisplayMessageDialog('Message', response.view, 'Close', FriendCenter.RefreshContentAction);

}

}

$.post(actionUrl, { 'gamerTag': gamerTag }, responseHandler);

};

this.AddFriend = function(gamerTag) {

gamerTag = $.trim(gamerTag); // trim leading and trailing whitespaces

if (gamerTag != "") {

fcAction('/en-US/FriendCenter/SendFriendRequest', gamerTag);

}

return false;

};

this.RefreshContentAction = function(){};

};

var FriendCenter = new FriendCenterObject();

//]]>

这是我希望用户能够点击的链接

Add to Friends List

我做了更多的投资,并且肯定使用内容类型为Content-Type的Post方法:application / json

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值