讯息通知

时间:2018-10-16 05:09:32

标签: javascript php

有一个显示消息的脚本:

<? 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> ';
?>

但是消息没有出现? 请帮忙。 谢谢

1 个答案:

答案 0 :(得分:0)

尝试使用

<script type="text/javascript">

<script language = "javascript">已弃用

如果($ query)不是错字,也请删除两者之间的空格,使其看起来像($query)