禁用href标记 [英] Disabled href tag

查看:101
本文介绍了禁用href标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 < a href =/disabled =disabled这个链接是禁用的, > 123N< / A> 

如果它被禁用,我可以不可点击吗?我应该使用JavaScript吗?

解决方案

超链接没有禁用属性。如果您不想要链接的东西,那么您需要全部移除< a> 标签。



删除 href 属性已足够。


Although that link is disabled, it's still clickable.

<a href="/" disabled="disabled">123n</a>

Can I make it not-clickable if it's disabled? Should I use JavaScript necessarily?

解决方案

There is no disabled attribute for hyperlinks. If you don't want something to be linked then you'll need to remove the <a> tag altogether.

ps.

Removing href attribute is sufficient.

这篇关于禁用href标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆