Tested with Chrome, IE and Firefox:
<iframe id="remember" name="remember" class="hidden" src="https://stackoverflow.com/content/blank"></iframe>
<form target="remember" method="post" action="https://stackoverflow.com/content/blank">
<fieldset>
<label for="username">Username</label>
<input type="text" name="username" id="username" value="">
<label for="password">Password</label>
<input type="password" name="password" id="password" value="">
</fieldset>
<button type="submit" class="hidden"></button>
</form>
In your Javascript trigger the submit, e.g. $("form").submit();
$("#submit_button").click()
(updated from comments)
You need to return an empty page at /content/blank for get & post (about:blank didn’t work for me but YMMV).