Быстрый ответ на ваш вопрос - использовать форму и добавить к ней атрибут target = "_ blank", однако это не дает вам контроля ширины и высоты.
Однако,Я думаю, что вы должны изменить, как вы подходите к этой ситуации.Этот подход сделает расширение его огромной болью в заднице.Используйте s.jQuery может обрабатывать формы намного проще, чем произвольные элементы ввода по всей странице.
<form id="search" method="post" action="send.php">
<input type="hidden" name="id" value="25">
<input type="text" name="email" placeholder="bill@stackoverflow.com">
<input type="submit" value="Send">
</form>
Теперь мы можем сделать:
// Sweet, the form was submitted...
$('#search').submit(function(e){
// Let's get the form with jQuery...
$form = $(this);
// Now you can do things like...
$.post( $form.attr('action'), $form.serializeArray(), function( result ) {
// "result" will inclue whatever the script returns...
});
// If you really need to open up the new window the only way I can think of controlling the size is with a get request...
window.open( $form.attr('action') + '?' + $form.serialize(), 'PopUp', 'width=100,height=100' );
// Stop the browsers default behavoir from kicking in!
e.preventDefault()
});