当前位置: 首页 > 工具软件 > jQuery A+ > 使用案例 >

jquery 设置a标签不可用,不可点击,禁用a标签

洪宏硕
2023-12-01

html源码:

<a href=“#” id=“gotoPage”>链接<a>

js源码:

$(“#gotoPage”).attr("disabled",true); //设置成灰色不可点击
$("#gotoPage").css("pointer-events","none");  //设置鼠标事件不可用

 

 类似资料: