一、方框形式超链接
<input type="button" value="注册" onclick="location.href='zhuce.jsp'"/>
二、对修改页面进行优化
<tr> <td>活动主题 (不超过20个汉字)</td> <td> <label> <input type="text" name="zhu_ti" value="${requestScope.active.zhu_ti}"/> </label> </td> </tr>
三、多条件模糊查询
String sql = "select * from active where "; if (zhu_ti != "") { sql += "zhu_ti like '%" +zhu_ti+ "%' "; } if (lei_xing != "") { sql += "and lei_xing like '%" +lei_xing+ "%' "; } if (shi_jian != "") { sql += "and shi_jian like '%" +shi_jian+ "%' "; } if (di_dian != "") { sql += "and di_dian like '%" +di_dian+ "%' "; }
//如果不输入,默认查询全部
if(zhu_ti==""&& lei_xing==""&& shi_jian==""&& di_dian=="")
{
sql = "select * from active";
}
Statement state = null;
state = connection.createStatement();
ResultSet rs = state.executeQuery(sql);
四、输入长度的判断
if( zhu_ti.length > 20) { alert('活动主题超出规定长度'); // name.focus(); return false; }
标签:dian,zhu,JavaWeb,jian,di,sql,方框,超链接,ti From: https://www.cnblogs.com/fan-wang/p/16846966.html