关于window.confirm的问题,简单问题解决后既散分
源码如下:
<?php
echo "<script language='javascript'>\n";
echo "if(!window.confirm('确认吗?')){self.location='sort.php'}";
echo "</script>";
include("checklogin.php");
include("../connections/conn.php");
$sele = "delete from table where sort_id=$sort_id_dele";
$result = mysql_query($sele) or die(mysql_error());
?>
问:执行时选择取消,但仍反执行$sele及$result语句。请问如何可以解决