<form method="POST">
<input type="text" name="url" value="google.com">
<input type="max" name="max" value="9999">
<input type="submit">
</form>
<?php
require("autovisitor.class.php");
$url = "google.com";
$max = 999;
for($i = 1; $i < $max+1; $i++) {
$class = new autovisitor($url);
echo $i.". SUKSES - [".$class->jalankan()."]<br>";
}
?>
答案 0 :(得分:2)
给form
一个ID:
<form method="POST" id="myform">
<input type="text" name="url" value="google.com">
<input type="max" name="max" value="9999">
<input type="submit">
</form>
然后立即:
<script type="text/javascript">
document.getElementById("myform").submit();
</script>
答案 1 :(得分:1)
试试这个:(使用jquery插件)
<form method="POST" id="myForm" action="">
<input type="text" name="url" value="google.com">
<input type="max" name="max" value="9999">
<input type="submit">
</form>
<script>
$(document).ready(function() {
$('#myForm').submit;
});
</script>
定义表单和操作属性的id。
答案 2 :(得分:1)
此脚本将在特定时间(5秒)后提交您的表单。
<script>
window.setTimeout(function() {
document.forms['myform'].submit();
}, 5000);
</script>
<form method="POST" name="myform">
<input type="text" name="url" value="google.com">
<input type="max" name="max" value="9999">
<input type="submit">
</form>