简体   繁体   English

使用 javascript jQuery.post() 打开 window

[英]using javascript jQuery.post() to open a window

in order to do a facebook invite automation i need to post specific data so that the facebook friend selection will open.为了进行 facebook 邀请自动化,我需要发布特定数据,以便 facebook 朋友选择将打开。 ill use this script on an already open event.生病在一个已经打开的事件上使用这个脚本。 i think i just dont get the post() method, or it not used the way i want it.我想我只是没有得到 post() 方法,或者它没有按照我想要的方式使用。 im trying to run directly from the browser the method like this:我试图直接从浏览器运行这样的方法:

javascript:$.post('/events/create.php',{/ajax/choose/?type: 'event' eid: 'someeventid' send_invites_on_close: '1'});

or:或者:

javascript:$.post('/events/create.php?eid=someeventid',{/ajax/choose/?type: 'event' eid: 'someeventid' send_invites_on_close: '1'});

any ideas?有任何想法吗?

thanks!谢谢!

edit:编辑:

the html behind the post is:帖子后面的 html 是:

<a class="mbs uiButton" role="button" href="/events/create.php?eid=*eventid*" rel="dialog-post" ajaxify="/ajax/choose/?type=event&amp;eid=*eventid*&amp;send_invites_on_close=1"><i class="mrs img sp_a2jb2c sx_c44d3d"></i><span class="uiButtonText">Select Guests to Invite</span></a>

The way of formatting parameters to JQuery post is like this (you were close, but need the commas to separate params):将参数格式化为 JQuery 帖子的方式是这样的(您很接近,但需要逗号分隔参数):

$.post("/events/create.php", { /ajax/choose/?type: 'event', eid: 'someeventid', send_invites_on_close: '1' });

(PS: not sure about whether your first param is legit without testing either - not sure about the special chars in there) (PS:不确定您的第一个参数是否未经测试合法 - 不确定其中的特殊字符)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM