I’m writing a page where I need to get the value attribute for the selected option within a select tag.
The way I usually do it like this:
onchange=”changeCurrentWebsite(this.options[this.selectedIndex].value)
However every time I use “.value” in Javascript my IDE(Intellij) complains that that symbol is deprecated… Does anybody know the correct way to do it?
Instead of
is it not possible to just use the “value” property of the element ?
Like this :
Or, in your case :
Does you IDE say it’s deprecated too ?