在PHP中回显jQuery警报弹出窗口

编程入门 行业动态 更新时间:2024-10-10 23:16:34
本文介绍了在PHP中回显jQuery警报弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想在满足PHP中的某些条件时显示一个弹出警报框.像这样:

I want to display a pop-up alert box upon some condition in PHP being satisfied. Something like:

echo "<script type="text/javascript"> alert('bleh'); </script>";

使用自定义jquery警报框除外.这可能吗?

except using a custom jquery alert box. Is this possible??

我尝试过类似的事情:

echo "<script src="code.jquery/jquery-1.9.1.js"></script> <script src="code.jquery/ui/1.10.3/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css" /> <script> $(function() { $( "#dialog-message" ).dialog({ modal: true, buttons: { Ok: function() { $( this ).dialog( "close" ); } } }); }); </script>";

但是它给了我一个怪异的效果.没有弹出.

but it gives me a weird effect. Not pop up.

感谢您的关注.

推荐答案

echo <<<EOD <script src="code.jquery/jquery-1.9.1.js"></script> <script src="code.jquery/ui/1.10.3/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css" /> <script> $("#dialog-message").dialog({ modal: true, buttons: { Ok: function() { $( this ).dialog( "close" ); } } }); </script> EOD;

更多推荐

在PHP中回显jQuery警报弹出窗口

本文发布于:2023-11-27 17:54:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1639017.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:警报   弹出窗口   PHP   中回显   jQuery

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!