开发者

setTimeout form submit + problems on google chrome

开发者 https://www.devze.com 2023-03-11 06:05 出处:网络
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.
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

精彩评论

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