0

I am writing a script to auto submit a form using greasemonkey. Here's my code:

setInterval(function () {location.href = javascript:submitAction_win0(document.win0,'DERIVED_REGFRM1_LINK_ADD_ENRL$118$');";}, 500);

setInterval() is working fine as I tested it with an alert(). There must be a problem with how I am trying to call submitAction_win0(). Kindly help!

4

1 回答 1

0

你根本不应该使用'location.href'。在这里如何做到这一点:

$("#form_id").submit(); //jQuery
document.getElementById("form_id").submit(); //plain JavaScript

一起

setInterval(function () {
 document.getElementById("form_id").submit();
}, 500);
于 2013-11-12T09:25:51.197 回答