HTML标签打开新窗口并发送POST值[重复]

This question already has an answer here:

I Want to open new window, And send to php file POST value.

Like

<a href = 'URL.php' target = '_blank'> Tish is link </a>

How to send POST value?

Edit : I already try this

<form target='_blank' method='POST' action='code.php'>
<input type = 'hidden' name='function_code' value='$code'>
<button id='submit_button' type = 'submit' value='$code'>$code</button>
</form>

But target=_blank opened new tab, not a pop-up(new window) I want to open 'New window & pop-up', Send Post value When i click button.

Solved like this

<form action='#' method='post' name='fdata' id='fdata'>
<input type='hidden' name='code' value='$code'>
<input type='button' name='btn' value='$code' onclick='window_open();'>
</form>

function window_open()
{
    window.open("about:blank","window_name","width=640,height=480,scrollbars=yes");
    document.fdata.target = "window_name";
    document.fdata.method = "post";
    document.fdata.action = "code.php";
    document.fdata.submit();
}

Thank you so much!

</div>

This is natively not possible.

You can however cheat a little and create a form to submit your data from there. It might be the easiest to use a button to submit the form, and restyle it to look like a link (see this question).

<form action="#" method="post" target="_blank">
    <input type="hidden" name="name" value="user3273401">
    <input type="hidden" name="text" value="I wanna do this!">
    <button type="submit" value="Tish is link">Tish is link</button>
</form>

This will send the data to a new tab with the POST method.