Home >Backend Development >PHP Tutorial >php如何清除已经echo的内容

php如何清除已经echo的内容

WBOY
WBOYOriginal
2016-06-20 12:31:102087browse

如题
例如


echo "如何删除这一句话!";
  ?>



从已经显示的网页中删除上面那句话!


回复讨论(解决方案)

<script>window.onload=function(){	document.getElementById("main").innerHTML = "";}</script>

使用js,给id="main"赋值为空

用按钮怎么删除?

加个button再给按钮加点击事件就好啦


<script> <br />function foo(){ <br /> document.getElementById("main").innerHTML = ""; <br />} <br /></script>

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