打开一个新的弹出窗口并向其发布数据

我正在使用jQuery打开一个弹出窗口,我想在打开时使用post方法发送数据。 任何人都可以帮助我,提前谢谢。

我目前正在使用get方法传递数据,因此数据是url中的一部分,但我不希望数据在url中可见。

function openWindow(){ var name = $('#name').val(); var url = 'popup_window.php?name='+name; window.open( url, 'popUpWindow', 'height=400, \ width=650, \ left=300, \ top=100, \ resizable=yes, \ scrollbars=yes, \ toolbar=yes, \ menubar=no, \ location=no, \ directories=no, \ status=yes'); } 

这是基于如何打开弹出窗口并使用父窗口中的数据填充它的答案?

 var newpage; function openWindow() { $.post('popup_window.php', {name: $('#name').val()}, function(result) { newpage = result; window.open('Popup.html', 'popUpWindow','height=400, width=650, left=300, top=100, resizable=yes, scrollbars=yes, toolbar=yes, menubar=no, location=no, directories=no, status=yes'); }); } 

Popup.html应该包含: