在servlet中获取动态添加的表值(Get the dynamically added table values in servlet)
我有我的jsp文件类似于以下内容:
<table> <tr class="schedule"> <td><input type="text" name="fromDate"</td> <td><input type="text" name="toDate"</td> <td> <table> <tr class="fromTime"> <td> <input type="text" name="fromHour"/> </td> </tr> </table> </td> <td> <table> <tr class="toTime"> <td> <input name="toTime"/> </td> </tr> </table> </td> <td> <table> <tr> <td> <input name="amount"/> </td> </tr> </table> </td> </tr> <tr class="totalAmount"> <td><input type="text" class="totAmount"</td> <tr> </table>
新的计划行被动态添加,对于每一个,可以有来自Time和toTime表的no.of。 我需要在我的servlet中获取这些值。 我知道我可以获得fromDate和toDate的值
String[] fromDates=request.getParameterValues("fromDate"); String[] toDates=request.getParameterValues("toDate");
我想知道如何从fromDate和toDate中检索fromHour和toHour值。
提前致谢。
I have my jsp file similar to the following:
<table> <tr class="schedule"> <td><input type="text" name="fromDate"</td> <td><input type="text" name="toDate"</td> <td> <table> <tr class="fromTime"> <td> <input type="text" name="fromHour"/> </td> </tr> </table> </td> <td> <table> <tr class="toTime"> <td> <input name="toTime"/> </td> </tr> </table> </td> <td> <table> <tr> <td> <input name="amount"/> </td> </tr> </table> </td> </tr> <tr class="totalAmount"> <td><input type="text" class="totAmount"</td> <tr> </table>
New schedule rows get dynamically added and for each of this, there can be no.of fromTime and toTime tables. I need to get these values in my servlet. I know I could get the values of fromDate and toDate through
String[] fromDates=request.getParameterValues("fromDate"); String[] toDates=request.getParameterValues("toDate");
I am looking to find out how I can retrieve fromHour and toHour values corresponding to its fromDate and toDate.
Thanks, in advance.
原文:https://stackoverflow.com/questions/26462673
满意答案
一种方法是这样的:
public void startProgress(){ //make the image visible imagView.setVisibility(ImageView.VISIBLE); //start a handler that will wait for 2000ms and then make the img invisible Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { imagView.setVisibility(ImageView.INVISIBLE); } }, 2000); }
One way of doing it would be like this:
public void startProgress(){ //make the image visible imagView.setVisibility(ImageView.VISIBLE); //start a handler that will wait for 2000ms and then make the img invisible Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { imagView.setVisibility(ImageView.INVISIBLE); } }, 2000); }
相关问答
更多更改Gridview项目的可见性(Change Gridview item visibility)
如何使用sleep更改ImageView的可见性(How to change visibility of ImageView with sleep)
根据结果更改Alertdialog的Imageview(Change Imageview of Alertdialog as per the result)
Android动画可见性同时更改两个视图(Android animate visibility change for two views at once)
更改按钮可见性(Change Button Visibility)
如何在Android studio中将GONE可见性更改为VISIBLE可见性(how to change a GONE visibility to VISIBLE visibility in android studio)
在动画之前影响了Imageview可见性(Imageview visibility affected before animation)
使用onmouseover / onmouseout更改可见性(change visibility with onmouseover / onmouseout)
在片段和活动之间进行委托,但未触发可见性更改(Delegate between fragment and Activity called but visibility change not triggered)
以编程方式更改imageView的颜色(Change colour of imageView programmatically)
相关文章
更多如何定时执行servlet
jquery与servlet交互的json问题
table-Oceanus配置说明
Guava集合工具类-Table接口映射处理
关于JSP 、 Servlet中文乱码问题, 方法差不多试完了 还是不行- -!
js 怎么传递数组参数到servlet?
请问怎么applet怎么通过servlet连接数据库
最新问答
更多获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
如何通过引用返回对象?(How is returning an object by reference possible?)
矩阵如何存储在内存中?(How are matrices stored in memory?)
每个请求的Java新会话?(Java New Session For Each Request?)
css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
xcode语法颜色编码解释?(xcode syntax color coding explained?)
在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!