如下,alert 弹出窗口里的文字是乱码。<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title></title>
</head>
<body>
<?
$j_id=$_GET["j_id"];
$connect=mysql_connect("localhost","root","");
mysql_select_db("work");
$exec="delete from job where j_id=".$j_id; //构造sql语句
//echo $exec;
mysql_query("set names 'gbk'");
mysql_query($exec);  //执行sql语句
mysql_query("set names 'gbk'");
if (!mysql_query){
echo "操作出错,请联系管理员!".mysql_error()."\n";
}
else {
echo "<script>alert('删除成功');location.href='job_reg.php';</script>";
}
?>
</body>
</html>