2017-07-23 29 views
0

我想收到的下拉框中我的數據,但是這個代碼似乎並不奏效獲取數據

if(rs.next()) 
{ 
    out.print("<select><option>out.print(rs.getString(1))</option></select>");   
} 

回答

0

它應該是:

if(rs.next()) 
{ 
    out.print("<select><option>" + rs.getString(1) + "</option></select>"); 
}