-1

这就是我想要为 ActionLink 制作警报框的原因。但它不起作用。

@Html.ActionLink("ADD", "BrandListComfirmed", new { id = item.brand_id }, new { onsubmit = "return confirm('Are u sure you want this brand? " + item.brand_name + "');" })
4

1 回答 1

5

没有onsubmit主播的事件。改用onclick

@Html.ActionLink(
    "ADD", 
    "BrandListComfirmed", 
    new { 
        id = item.brand_id 
    }, 
    new { 
        onclick = "return confirm('Are u sure you want this brand? " + item.brand_name + "');" 
    }
)
于 2013-05-17T06:28:16.943 回答