Reputation: 209
JSBIN: https://jsbin.com/favakevuhu/edit?html,css,js,console,output
In the bin above, how would I lock the select box after making a choice, so that you can't select another choice?
Like if I select 'yes', I'd want it to lock so you can't change the choice to 'no'.
I've done something like this with input
, and using onblur
and contenteditable = false
to lock the input
box. But I'm not sure if you can do contenteditable
with select
.
Upvotes: 1
Views: 161
Reputation: 13994
Use el.disabled = true
inside the onchange to make the input uneditable
Upvotes: 2