javascript - how can I change the label name when the option value change? -
i have combo box , values 1 , 3 inside combobox. when page loads default value 1 , default label name 1.... if select 2 on combo box make label name 2.
function changelabel(){ if (document.getelementbyid('conbobox').value !=1) {document.getelementbyid('mylabel').label="2"} }
i can't see markup, assume element id 'mylabel' div labeling combobox element. if case, use
document.getelementbyid('mylabel').innerhtml = "2"
Comments
Post a Comment