以下代码,但无法正常工作。
$('#img').on('click', function () {
$("#new").dialog({
autoOpen: true,
position: { my: "center", at: "top+350", of: window },
width: 1000,
resizable: false,
title: 'Add User Form',
modal: true,
open: function () {
$(this).load('@Url.Action("_new", "Help")');
},
buttons: {
"Add User": function () {
addUserInfo();
},
Cancel: function () {
$(this).dialog("close");
}
}
});
return false;
});
我_new
在Help
Folder Under下有部分视图名称Views
。
有人也可以指导我实现这一目标。我正在使用MVC4框架:)
您必须将点击移动到锚点(a
)而不是img
。点击事件将永远不会到达img
。
参见jsfiddle。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句