Currently I have this url to send data to another page.
function clickBtn(){
window.location.href =`/dashboard?id=12&name=test
}
Now I want to send this by post.
However it is said window.location.href
is impossible to use for post
So I made this form
however it is not javascript and also require user to click submit button.
<form action=dashbaord>
<input type=hidden id=id value=12>
<input type=hidden id=name value="test">
<input type=submit>
</form>
Is there any more equivalent way to the window.location.href
?