本文介绍了在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警报弹出窗口
发布评论