As it was already mentioned: READONLY
does not work for <input type='checkbox'>
and <select>...</select>
.
If you have a Form
with disabled checkboxes / selects AND need them to be submitted, you can use jQuery:
$('form').submit(function(e) {
$(':disabled').each(function(e) {
$(this).removeAttr('disabled');
})
});
This code removes the disabled
attribute from all elements on submit.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…