开发者

is there a way to hide button value without CSS?

开发者 https://www.devze.com 2023-03-27 20:49 出处:网络
Could someone please be so kind and tell me how I can hide the value of button without 开发者_运维技巧using CSS (I do not know how to use CSS)?

Could someone please be so kind and tell me how I can hide the value of button without 开发者_运维技巧using CSS (I do not know how to use CSS)?

Thank you.


A great hack to removing text from nodes is using text-indent:

.button {
    text-indent: -9999px;
    overflow: hidden;
}

This will hide the text in a screen-reader safe manner.


Use Javascript

document.getElementById('yourButtonId').value = '';
0

精彩评论

暂无评论...
验证码 换一张
取 消