Php jquery ui对话框从其他文件获取数据

Php jquery ui对话框从其他文件获取数据,php,Php,我尝试在“显示在jquery上”对话框中从其他php文件获取数据 这是我的代码: var url = $('.exampleLink').attr('href'); var $modalDialog = $('<div/>') .dialog({ resizable: true, autoOpen: false, modal: false }); $(function () {

我尝试在“显示在jquery上”对话框中从其他php文件获取数据 这是我的代码:

    var url = $('.exampleLink').attr('href'); 

    var $modalDialog = $('<div/>')
    .dialog({
        resizable: true,
        autoOpen: false,
        modal: false
    });

    $(function () {
        $('.exampleLink').on('click', function (e) {
            e.preventDefault();
            $modalDialog.load(url);
            $modalDialog.dialog("open");
        });
    });



 <a href="call.php?a=2" class="exampleLink"  >Test</a>


    <a href="call.php?a=3" class="exampleLink" >other test</a>
var url=$('.exampleLink').attr('href');
变量$modalDialog=$('')
.对话({
可调整大小:正确,
自动打开:错误,
模态:假
});
$(函数(){
$('.exampleLink')。在('click',函数(e)上{
e、 预防默认值();
$modalDialog.load(url);
$modalDialog.dialog(“打开”);
});
});
但是元素a没有显示的问题是,当我单击这两个链接时,如果
a=2
,则保持给定