警报警报(document.inform.cid);即将到来未定义
<html>
<head>
<script type="text/javascript">
var interval = window.setInterval(iterate, 5000);
function iterate() {
var myStringArray = ["user1", "user2"];
iterate.arr = iterate.arr || myStringArray.slice(0);
//if it still has elements left
if(iterate.arr.length > 0) {
document.inform.cid = iterate.arr.pop(); //remove the top one
alert(document.inform.cid);
document.inform.pwd = "xxxxxxxx";
document.inform.target = iterate.arr.length; // a different target each time - length of the arr
document.inform.submit();
} else {
window.clearInterval(interval); //no more left cancel it
}
};
</script>
</head>
<body >
<form name="inform" target="newWin" action="https://www.google.co.in/">
<input type="hidden" name="throttle" value="999" />
<input type="text" name="cid" />
<input type="text" name="pw" />
<input type="submit" value="go" onclick="iterate()">
</form>
</body>
</html>