我试图弹出部分视图,但它不起作用,这是我的链接
<a id="id1" href="@Url.Action("index", "versus", new { matchid = c.MatchID })" target="_blank" data-toggle="tooltip" data-placement="top"
title="@homeMLName - @awayMLName">
@homeMLName - @awayMLName
</a>
这是我的剧本:
<script>
$('a#id1').click(function (event) {
event.preventDefault();
window.open($(this).attr('href'), '_blank');
});
</script>
答案 0 :(得分:0)
这对我有用:
<a style="cursor:pointer;" data-toggle="tooltip" data-placement="top" title="@homeMLName - @awayMLName"
onclick="window.open('@Url.Action("index", "versus", new { matchid = c.MatchID})','_blank', 'targetWindow', 'menubar=no,scrollbars=yes,resizable=yes, width=600, height=650'); return false;">
@homeMLName - @awayMLName
</a>