开发者

Read value of select box

could somebody please tell me how to achieve the following:

I have a SELECT with different OPTIONs. When I click on one of these opt开发者_如何学JAVAions I want the value to be shown in a DIV. I tried it with this.value but for some reason I am still doing something wrong. Can somebody please help?

Thanks


var select = document.getElementById("mySelectId");
select.options[select.selectedIndex].value;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜