把下面代码加到PHP有有关问题,请PHP高手帮小弟我看看。(有人说要有转义符的)

WBOY
Release: 2016-06-13 13:45:07
Original
828 people have browsed it

把下面代码加到PHP有问题,请PHP高手帮我看看。(有人说要有转义符的)
把这段代码加到PHP有问题。  

('midir')小括号的不能动。。必须得用单引号


PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><p id="midi" class="f14"><a class="f14" onclick="document.getElementById('midi').innerHTML = document.getElementById('midir').innerHTML;" href="javascript:void(0)">查看答案</a></p>
Copy after login






------解决方案--------------------
你说的只是输出吧?这样的话用这种形式方便点,不需要对内容中的引号转义
PHP code
echo <a class="f14" onclick="document.getElementById('midi').innerHTML = document.getElementById('midir').innerHTML;" href="javascript:void(0)">查看答案</a>
html;
<br><font color="#e78608">------解决方案--------------------</font><br>那要看你是如何加的,加在哪里
<br><font color="#e78608">------解决方案--------------------</font><br>echo  <p id="midi" class="f14"><a class="f14" onclick="document.getElementById('midi').innerHTML = document.getElementById('midir').innerHTML;"></a>href="javascript:void(0)">查看答案</p><br>html;<br><br>这样就好了。<br>html;前面不能有空格。
<br><font color="#e78608">------解决方案--------------------</font><br>
Copy after login
探讨
请问你有邮箱或是QQ吗》? 我把东西传给你。一看就知道了,这么说不太好说,

------解决方案--------------------
转义或把那一段赋值给一个变量。再连接上。。
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