setTimeout form submit + problems on google chrome
setTimeout(function() { document.form_name.submit(); },1000);
it won't wort on google chrome.
gooogle chrome always see it as a popup and try to block it.
but if 开发者_运维技巧i do:
document.form_name.submit();
it work perfect.
could someone help me?
thx.
Try this: (assuming the form id is 'myForm'
):
setTimeout(function(){
document.forms["myForm"].submit();
},1000)
I think, your form has target
attribute set to _blank
:
<form target="_blank">...</form>
http://jsfiddle.net/SVQM8/4/
Iceweasel also treats it like pop-up window.
精彩评论