Javascript 关于jquery对话框

Javascript 关于jquery对话框,javascript,php,jquery,Javascript,Php,Jquery,如何将此代码放入我的程序中的注册代码中,如果注册成功,将弹出此代码??我是jquery的新手,所以我不知道如何做这件事……请帮帮我 <script> $(document).ready(function() { // show a dialog box when clicking on a link $("#press").on('click', function(e) { e.preventDefault(); $.Zebra_Dialog(

如何将此代码放入我的程序中的注册代码中,如果注册成功,将弹出此代码??我是jquery的新手,所以我不知道如何做这件事……请帮帮我

<script>
$(document).ready(function() {
    // show a dialog box when clicking on a link
    $("#press").on('click', function(e) {
        e.preventDefault();
    $.Zebra_Dialog('<strong>Congratulations </strong>' + 
    'You are now successfully registered!');
    });
 });
</script>

$(文档).ready(函数(){
//单击链接时显示对话框
$(“#按”)。按('click',函数(e){
e、 预防默认值();
$.Zebra_对话框(“祝贺您””+
“您现在已成功注册!”;
});
});
以下是我的php代码:

<?php 

if(isset($_POST['save']))
{
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$position = $_POST['position'];
$username = $_POST['username'];
$password = $_POST['password'];
$dateregistered = date("Y-m-d H:i:s");
if (!$_POST['fname'] || !$_POST['lname'] || !$_POST['position'] || !$_POST['username'] || !$_POST['password'] ) 
{
echo "You did not complete all of the required fields!";
}
else
{
$query="INSERT INTO users (position, fname, lname, username,password,dateregistered) VALUES ('$position','$fname','$lname','$username','$password',CURRENT_TIMESTAMP) ";
mysql_query($query);
if($query){
echo "You Successfully Created an Account!";
}
}
}
?>

弹出窗口
是这样的意思吗?你为什么不试试alert(“祝贺你”“+”你现在成功注册了!”)?