Home > Backend Development > PHP Tutorial > :怎么在页面显示数据库中的script代码但是却不让它执行

:怎么在页面显示数据库中的script代码但是却不让它执行

WBOY
Release: 2016-06-13 12:41:25
Original
1198 people have browsed it

求助:如何在页面显示数据库中的script代码但是却不让它执行
如题

例如:  这是一个简介 <script>alert('hah')</script>

用户使用textarea来输入内容并提交,存进数据库

然后读出来显示在前台 就alert了hah 想让它显示也是跟输入的一样却不执行

求教

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template