zero-zm

更多JS实战记录,请前往:https://www.yuque.com/smallwhy/yyvuqy

JS


// 禁用超链接元素elem ;
document.getElementById(elemID).setAttribute(\'disabled\', \'disabled\');

// 启用超链接元素elem
document.getElementById(elemID).removeAttribute(\'disabled\');

JQuery


// 禁用超链接元素elem
$(elem).attr(\'disabled\', \'disabled\');

// 启用超链接元素elem
$(elem).removeAttr(\'disabled\');

分类:

技术点:

相关文章: