如何從ActionLink asp.net Mvc 3調用jquery函數?
如何從actionlink調用jquery函數。我的this.href結果爲: 「localhost:54678/Customer?param = 1」但我需要this.href: 「localhost:54678/Customer/EditCustomer /?param = 1」 Customer是Controller,EditCustomer是Action。
的Jquery:
$('#mylink').click(function (e) {
jQuery('#dialog').dialog('open');
var iframe = $('#frame');
alert(this.href);
$(iframe).attr('src', this.href);
e.preventDefault();
});
查看:
<%= Html.ActionLink(
"Click",
"Index",
new { param = 1 },
new { id = "mylink" })
%>
本地主機:54678 /客戶/ EditCustomer /參數= 1如何調用這個?