开发者

Disable ActionLink without jQuery or Javascript

is it possible to disable an ActionLink 开发者_高级运维with a style or attribute or something. I do not want uses to click on it if they do not have JavaScript enabled.


You can add link using JavaScript on the fly.

<a href="#" class="dis" > I am disabled link which will be enabled later if js is enabled </a>

jQuery code to enable it if JavaScript is enabled:

$(document).ready(function() {
    $(".dis").attr('href','http://example.com');
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜