摘要: 假如页面上的用户名文本框是这么写的:用户名:<input type="text" name="userName"/> 方法一:没有用到Ajax 1、先获取页面上输入的用户名的值。:String username = requset.getParameter("userName") 注意:括号里的us 阅读全文
posted @ 2017-02-13 21:40 稻小白 阅读(419) 评论(0) 推荐(0) 编辑
摘要: 很简单的举例:例如,我这里要获取数据库user表里的 username 传入select的option中。 1、先写方法获取数据库里的 user 表里的数据,我这里是userDao 下的 getAllUser() 来获取。 2、在Servlet中,创建方法getUserinfo 3、创建要转发到的页 阅读全文
posted @ 2017-02-13 19:06 稻小白 阅读(7398) 评论(0) 推荐(0) 编辑