在PHP中,Jquery模态形式对我不起作用

Recently I'm starting to use jquery, when trying to popup a modal form using jquery its won't working for me, the css file and javascript files are keeping locally. Please see the code snippet below

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title></title> 
    <script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="jquery-ui.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    var $dialog = $('<div></div>')
        .html('This dialog will show every time!')
        .dialog({
            autoOpen: false,
            title: 'Basic Dialog'
        });

    $('#opener').click(function() {
                alert('test');
        $dialog.dialog('open');
        // prevent the default action, e.g., following a link
        return false;
    });
});
</script> 

</head>
<body>        
    <?php
      echo '<link rel="stylesheet" type="text/css" href="jquery-ui.css">';
    ?>
    <button id="opener">Open the dialog</button>

</body>

Please correct me if I did any mistake. Thanks all.

You need to include:

modal: true,

in your dialog definition like this:

var $dialog = $('<div></div>')
    .html('This dialog will show every time!')
    .dialog({
        autoOpen: false,
        modal: true,
        title: 'Basic Dialog'
    });