Get <select> text using 'this' keyword

html, javascript, xhtml

Solution

`this.options[this.selectedIndex].value`

Problem

I am using following code: ``` <select class="element select medium" id="inDistrict" name="inDistrict" onchange="setCookie('lastvalue',this.value,1);"> ``` It is not taking: this.value. What else to use to get the DropDown selected text?

Original source