Home > php教程 > php手册 > 在PHP页面执行alert()时,弹出乱码窗口

在PHP页面执行alert()时,弹出乱码窗口

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-14 00:02:53
Original
1126 people have browsed it

PHP页面的编码方式是utf-8,用 echo "

原因:因为有alert()输出中文到浏览器,所以一定要在网页中指定编码方式为UTF-8,即该行不能缺少!
注:如果PHP页面编码方式是gb2312,则不需要添加行

Statement of this Website
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
Latest Issues
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template