HTML表单提交后如何保留Text框中的数据?
如图所示,点击完以后两个Text框中的数字依然保留<fontsize='2'>查询区段:<inputtype="text"name="inputMinScore"size...
如图所示,点击完以后两个Text框中的数字依然保留
<font size = '2'>查询区段:<input type = "text" name = "inputMinScore" size = "3" maxlength = "3"/> 分 ~ <input type = "text" name = "inputMaxScore" size = "3" /> 分
<input type = "Button" name = "btnInquiry" value = "点击查询" onclick = "btnInquiryCheck()"/></font> 展开
<font size = '2'>查询区段:<input type = "text" name = "inputMinScore" size = "3" maxlength = "3"/> 分 ~ <input type = "text" name = "inputMaxScore" size = "3" /> 分
<input type = "Button" name = "btnInquiry" value = "点击查询" onclick = "btnInquiryCheck()"/></font> 展开
展开全部
给表单赋值:
php的这样:<input type = "text" name = "inputMinScore" size = "3" maxlength = "3" value="<?php echo $_POST[inputMinScore];?>" />
<input type = "text" name = "inputMaxScore" size = "3" value="<?php echo $_POST[inputMaxScore];?>" />
asp这样:
<input type = "text" name = "inputMinScore" size = "3" maxlength = "3" value="<%= Request[inputMinScore]%>" />
<input type = "text" name = "inputMaxScore" size = "3" value="<%= Request[inputMaxScore]%>" />
php的这样:<input type = "text" name = "inputMinScore" size = "3" maxlength = "3" value="<?php echo $_POST[inputMinScore];?>" />
<input type = "text" name = "inputMaxScore" size = "3" value="<?php echo $_POST[inputMaxScore];?>" />
asp这样:
<input type = "text" name = "inputMinScore" size = "3" maxlength = "3" value="<%= Request[inputMinScore]%>" />
<input type = "text" name = "inputMaxScore" size = "3" value="<%= Request[inputMaxScore]%>" />
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询