我想在执行页面 5 秒后执行页面脚本
意味着如果我访问http://localhost/form.php
然后它等待 5 秒然后处理页面的全部内容。
我的页面是这个
<?php
$con=mysqli_connect("localhost","root","","ex_smartcard2013");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result3 = mysqli_query($con,"SELECT id,name,course,amount FROM fess order by id desc limit 1");
while($row = mysqli_fetch_array($result3))
{
if($row['name'])
{
$id = $row['id'];
$name = $row['name'];
$course = $row['course'];
$amount = $row['amount'];
}
}
?>
<div style="display:none;">
<iframe id="ponyo_frame" name="ponyo_frame"></iframe>
<div class="ss-form"><form action="https://docs.google.com/forms/d/1IDfOSwEcNYwvqxBHlGOTmPbZQrS7vr7Q1xw77UBVLUc/formResponse" method="POST" id="ss-form" target="ponyo_frame" onsubmit=""><ol style="padding-left: 0">
<input type="text" name="entry.1312370642" value="<?php echo $id; ?>" class="ss-q-short" id="entry_1312370642" dir="auto" title="">
<input type="text" name="entry.1082361902" value="<?php echo $name; ?>" class="ss-q-short" id="entry_1082361902" dir="auto" title="">
<input type="text" name="entry.234382219" value="<?php echo $course; ?>" class="ss-q-short" id="entry_234382219" dir="auto" title="">
<input type="text" name="entry.1270326869" value="<?php echo $amount; ?>" class="ss-q-short" id="entry_1270326869" dir="auto" title="">
</div></div><script type="text/javascript">
document.getElementById("ss-form").submit();
</script>
</div>