使用jsp刷新页面 [英] refreshig the page using jsp

查看:84
本文介绍了使用jsp刷新页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个带有下拉按钮(s1和s2)和其他一些字段的CATEGORY字段,当我选择下拉按钮为s1时,它必须显示一个额外的字段作为日期.当我选择下拉菜单为s2时,它具有消失到这里它的工作正常.我有一个提交按钮和重置按钮.我的问题是当我选择下拉列表为s1时,多余的日期字段就可以了.但是当我单击重置时,它必须重置到s1和日期字段必须消失.它正在重置为s1,但是如果我单击f5然后日期字段保持不变,那么它就消失了.是否有任何想法可以做到这一点(s1是CATEGORY的默认下拉按钮) .我正在用jsp编写relevent代码.

在此先感谢

Hi
I have a field as CATEGORY with drop down button (s1 and s2) with some other fields.When i select the drop down button as s1 then it has to display one extra field as date.When i select the drop down as s2 it has to disappear upto here its working fine.I have a submit button and reset button.My problem is when i select the drop down as s1 then the extra date field is coming its ok fine.But when i click on the reset it has to reset to the s1 and date field has to disappear.It is resetting to the s1 but the date field remains same if i click on f5 then its gone.Is there any idea to do this one(s1 is the default drop down button for CATEGORY).I am writing relevent code in jsp.

Thanks in advance

推荐答案

命令window.location.reload();应该可以解决问题.
当按下重置"按钮并按所需方式设置值时调用它.
The command window.location.reload(); should do the trick.
Call it when the button "reset" is pressed and values are set the way you want them.


这篇关于使用jsp刷新页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆