Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ラベルの「for」属性には、ラジオボタンのIDがあります。ラジオボタンを非表示にすることはできますが、ラベルを非表示にすることはできません。どうすればラベルを非表示にできますか?
jQueryを使用する場合:
$('#radio_btn').hide(); $('label[for="radio_btn"]').hide();
または異なるマークアップで:
HTML:
<label for="radio"><input type="radio" id="radio"> Radio</label>
JS:
$('label[for="radio"]').hide();