dou2347 2016-09-10 19:22 采纳率: 0%
浏览 65

使用Internet Explorer的setTimeout位置

i try to reload the page after click on button

1- Click on button 2- Little message appear: "well done" 3- Refresh the page after 2 seconds

My code work fine except with internet explorer. Can you help me please

<form method="post" action="">
<button type="image" src="../../images/favoris.png"  class="ajouter"      value="ajouter" name="ajouter"></button> 
</form> 

<?php

if (isset($_POST['ajouter']) ) 
{
$sql = "INSERT INTO favoris (id, client) VALUES('','$pseudo')";
mysql_query($sql) or die('Erreur SQL ! '.$sql.'<br>'.mysql_error());

echo 'well done
<script type="text/javascript"> 
window.setTimeout("location=(\'\');",2000) 
</script>';
}

Thanks

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 把Excel导入MATLAB显示错误怎么解决?
    • ¥15 Java中消息和缓存如何使用
    • ¥50 易语言把MYSQL数据库中的数据添加至组合框
    • ¥20 求数据集和代码#有偿答复
    • ¥15 关于下拉菜单选项关联的问题
    • ¥20 java-OJ-健康体检
    • ¥15 rs485的上拉下拉,不会对a-b<-200mv有影响吗,就是接受时,对判断逻辑0有影响吗
    • ¥15 使用phpstudy在云服务器上搭建个人网站
    • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
    • ¥15 vue3+express部署到nginx