문제

I use window.location.reload(); on my page.

But in Chrome it do not re-send form data.

Standart browser refresh, ask about resending. FF and Opera works fine.

Is there some cross-browser solution?

도움이 되었습니까?

해결책

Try (BAD ANSWER, SOLUTION BELOW)

window.location.reload(true);

SOLUTION :

Bad answer after research, sorry. The only solution consists to create an hidden form with method post and simulate a submit on this form ;)

<form action="?" method="POST" style="display:none" id="myform">
<input type="text" name="mydata" value="myvalue" />
</form>
<script>
;$(function() {
  $('#myform').trigger('submit');
});
</script>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top