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

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -