在jsp中,在select onchange事件中,获得选择的内容var op = opSet.options[opSet.selectedIndex].text;然后在下面想用这个op作为条件去查询数据库op = op.toString();
ResultSet rs = stmt.executeQuery("SELECT * FROM A WHERE TB = '"+op+"'");
提示op cannot be resolved 错误