如何禁用HTML标签? [英] How to disable a HTML tag?

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

问题描述

我想停用已设定的标记,例如使用 disabled =true或某些功能停用选单。

I want to disable a tag if it's already set -- e.g., disable a menu using disabled = "true" or something.

我可以使用PHP完全删除一个标签;但我已经风格化它,只想禁用它。可能吗?

I can remove a tag completely using PHP; but I have already styled it and only want to disable it. Is it possible?

推荐答案

不,没有CSS唯一的方式我知道,禁用链接的方式描述。

Nope, there is no CSS-only way known to me to disable a link the way you describe.

唯一要注意的是在链接前添加一个额外的透明元素,但这也不能在纯CSS中实现。

The only thing that comes to mind is putting an additional, transparent element in front of the link, but that can't be achieved in pure CSS, either.

在PHP中生成 href ='#'onclick ='return false'

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

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