开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜