我尝试从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>
但是当我点击这两个链接时,如果a = 2
,那么元素a没有显示的问题是保持给予。