close(); 当我的程序运行到这里是 "/> close(); 当我的程序运行到这里是 ">

Home  >  Article  >  Backend Development  >  js 弹窗出现乱码了解决方案

js 弹窗出现乱码了解决方案

WBOY
WBOYOriginal
2016-06-13 12:58:051049browse

js 弹窗出现乱码了
if($DB->query($sql))
{
echo "<script>alert('提交成功,感谢你的支持');window.location.href='solictopic.php'</script>";
}
$DB->close();

当我的程序运行到这里是 弹出提示框 是个乱码? 是不是要设置utf编码啊?
------解决方案--------------------
js 弹出的窗口文字跟你的页面编码有关系.

在页面添加

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn