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');
});
精彩评论