Skip to content

Instantly share code, notes, and snippets.

@sugarHoge
Created August 21, 2013 04:09
Show Gist options
  • Save sugarHoge/6290232 to your computer and use it in GitHub Desktop.
Save sugarHoge/6290232 to your computer and use it in GitHub Desktop.
jQueryを使用して無の状態から新しいウインドウにPOSTする http://endlesslogic.blog135.fc2.com/blog-entry-3.html
var form = $('<form></form>',{action:'./receiver.php',target:'receiver',method:'POST'}).hide();
var body = $('body');
body.append(form);
form.append($('<input>',{type:'hidden',name:'param1',value:'value1'}));
form.append($('<input>',{type:'hidden',name:'param2',value:'value2'}));
form.append($('<input>',{type:'hidden',name:'param3',value:'value3'}));
window.open('about:blank'
,'receiver'
,'menubar=no,toolbar=no,location=no,status=no,resizable=yes');
form.submit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment