我是.net 不是java 不过应该都是同样道理吧。
<input type="checkbox" name="chkUser" value="1" <%=_checked %> />记住用户名
在后台声明一个字符串变量,protected string _checked = ""; 默认为空,
需要选中时_checked = "checked=\"checked\"";
把整个checked=“checked” 当作字符串变量绑定到前台页面就可以了。
在前臺input中加入 runat="server" 在後臺中String ss = Request.Form["start"];
未完待續。。。。 常用的基本控件 CheckBox ImageView 常用的屬性 代碼示例 ListView ListView的簡單用法 A