javascript - dynamically change the my label text with selection value of my comboBox? -
I am using classic ASP and want to change my labels text dynamically with the selection value of my combo box I am If I select 1 on the combo box then my label text = "Hello" if I select 2 from my label = "how are you" ...
On the page your default label text = "Hello" load. And my combo box and label inside the table.
function changeLabel () {if (document.getElementById ('mycomboBoxID'). Value! = 1) {document.getElementById ('LabelID'). InnerHTML = "how are you"}}
This is a question about javascript, Not classic ASP. To set HTML content of LabelID with your value of your combobox (mycomboBoxID), you can do the following: I consider your change. The mail function is worn to the oncoming event of the combox. Change function labels () {document.getElementById ('LabelID'). InnerHTML = document.getElementById ('mycomboBoxID') .Value; } If you want text of the item chosen instead of the value of the combo box, then you can do it instead: [Code.getElementById ('LabelID')
Comments
Post a Comment