// JSP
<Script language = "JavaScript">
Function loginin (){
VaR selectob = Document. getelementbyid ("select"); // select object
VaR selecttext = selectob. Options [selectob. selectedindex]. Text // get the text
// 1.var selectob = Document. getelementbyid ("selectobid"); // select object
// 2.var selectid = selectob. selectedindex; // The selected index
// 3.var selectvalue = selectob. Options [selectob. selectedindex]. Value // obtain the value
// 4.var selecttext = selectob. Options [selectob. selectedindex]. Text // obtain the text
// 5. selectob. Options. Length = 0 // clear
// 6. selectob. Options [0] = New Option ("text", 'value'); // Add data
Form9.action = "Servlet/loginservlet? Selectt = "+ selecttext;
Form9.submit ();
}
</SCRIPT>
<Form name = "form9" method = "Post">
<% string SQL =" select username from user where adminname = '"+ session. getattribute ("adminname") + "'"; resultset rs = dB. query (SQL); while (RS. next () {%> <% = Rs. getstring ("username") %> <% }< BR >%>
</Form>
// Servlet
String selectname = request. getparameter ("selectt ");