Change your HTML code to:
<select id="isTitles" name="isTitles" >
The id attribute of the select tag is mainly used to use the DOM, and the name attribute is used to specify the form data key.
And then use request.getParameter("isTitles") , your will get the correct value. getParameter designed to retrieve parameters from form data and URL query string. For now, getAttribute designed to transfer data through a process chain throughout the request life cycle.
Weibo li
source share