Home > php教程 > php手册 > 详细解读PHP弹出对话框技巧

详细解读PHP弹出对话框技巧

WBOY
Release: 2016-06-13 11:12:12
Original
978 people have browsed it

许多程序员们运用

1. PHP弹出对话框

  1.  ?PHP   
  2. echo "script language=
    "JavaScript"
    >alert
    ("你好");
    script>";   
  3. ?>   

或者

  1.  ?PHP   
  2. print "script language=
    "JavaScript"
    >alert
    ("你好");
    script>";   
  3. ?>  

2. 如果需要PHP弹出对话框之后返回原来页面可以这么写

<ol class="dp-xml">
<li class="alt"><span class="tag"> ?PHP   </span></li>
<li>
<span>echo "</span><span class="tag"><span class="tag-name">script</span><span> </span><span class="attribute">language</span><span>=<br>"JavaScript"</span><span class="tag">></span><span>rn";   </span></span>
</li>
<li class="alt"><span>echo " alert("你好");rn";   </span></li>
<li><span>echo " history.back();rn";   </span></li>
<li class="alt">
<span>echo "</span><span class="tag"><span class="tag-name">script</span><span class="tag">></span><span>";   </span></span>
</li>
<li><span>exit;   </span></li>
<li class="alt">
<span class="tag">?></span><span>   </span>
</li>
</ol>
Copy after login

或者

<ol class="dp-xml">
<li class="alt"><span class="tag"> ?PHP   </span></li>
<li>
<span>print "</span><span class="tag"><span class="tag-name">script</span><span> </span><span class="attribute">language</span><span>=<br>"JavaScript"</span><span class="tag">></span><span>rn";   </span></span>
</li>
<li class="alt"><span>print " alert("你好");rn";   </span></li>
<li><span>print " history.back();rn";   </span></li>
<li class="alt">
<span>print "</span><span class="tag"><span class="tag-name">script</span><span class="tag">></span><span>";   </span></span>
</li>
<li><span>exit;   </span></li>
<li class="alt">
<span class="tag">?></span><span>   </span>
</li>
</ol>
Copy after login

3. 如果需要PHP弹出对话框之后用新的页面替换原来的页面(更换当前历史纪录),原来页面可以这么写

<ol class="dp-xml">
<li class="alt"><span class="tag"> ?PHP   </span></li>
<li>
<span>echo "</span><span class="tag"><span class="tag-name">script</span><span> </span><span class="attribute">language</span><span>=<br>"JavaScript"</span><span class="tag">></span><span>rn";   </span></span>
</li>
<li class="alt"><span>echo " alert("你好");rn";   </span></li>
<li><span>echo " location.replace<br>("http://www.asm32.net/");<br>rn"; // 自己修改网址   </span></li>
<li class="alt">
<span>echo "</span><span class="tag"><span class="tag-name">script</span><span class="tag">></span><span>";   </span></span>
</li>
<li><span>exit;   </span></li>
<li class="alt">
<span class="tag">?></span><span>   </span>
</li>
</ol>
Copy after login

或者

<ol class="dp-xml">
<li class="alt"><span class="tag"> ?PHP   </span></li>
<li>
<span>print "</span><span class="tag"><span class="tag-name">script</span><span> </span><span class="attribute">language</span><span>=<br>"JavaScript"</span><span class="tag">></span><span>rn";   </span></span>
</li>
<li class="alt"><span>print " alert("你好");rn";   </span></li>
<li><span>print " location.replace<br>("http://www.asm32.net/");<br>rn"; // 自己修改网址   </span></li>
<li class="alt">
<span>print "</span><span class="tag"><span class="tag-name">script</span><span class="tag">></span><span>";   </span></span>
</li>
<li><span>exit;   </span></li>
<li class="alt">
<span class="tag">?></span><span> </span>
</li>
</ol>
Copy after login


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