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

WBOY
发布: 2016-07-15 13:35:06
原创
884 人浏览过

许多程序员们运用

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>
登录后复制

或者

<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>
登录后复制

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>
登录后复制

或者

<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>
登录后复制


www.bkjia.comtruehttp://www.bkjia.com/PHPjc/445923.htmlTechArticle许多程序员们运用 1. PHP弹出对话框 ?PHP echo script language = JavaScript alert (你好); / script ; ? 或者 ?PHP print script language = JavaScript alert (你好); /...
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!