有一个显示消息的脚本:
<? php
include "config.php";
$id = $_GET ['id'];
$query =mysql_query("DELETE FROM table_name WHERE id='$id'");
if ($query) {
echo '<script language = "javascript"> swal ({
title: "Warning!",
text: "Success Delete id!",
type: "success"
}, function () {
window.location.href = "index.php";
}); </ script> ';
?>
但是消息没有出现? 请帮忙。 谢谢
答案 0 :(得分:0)
尝试使用
<script type="text/javascript">
<script language = "javascript">
已弃用
如果($ query)
不是错字,也请删除两者之间的空格,使其看起来像($query)