正确地从隐藏类型获取值的方法 [英] the way to get a value from a hidden type correctly
问题描述
在html表格中,我在每一行中构造一个编辑按钮,如下所示:
retour.append(< input type = \hidden\id = \id _+ nomTab +_+ compteur +\value = \+ object.getIdDailyTimeSheet()+\name = \ hd _+ compteur +\/>);
这是隐藏类型,然后我执行以下操作:
retour.append(< button id = edit name = edit type = button onClick = editarow()>);
retour.append(< img src = edit.gif />);
retour.append(< / button>);
retour.append(< / td>);
这里我使用隐藏类型来区分我的行与它。
现在我正试图在我的servlet中获取名为here:value = \+ object.getIdDailyTimeSheet()的参数,以基于IdDailyTimeSheet执行更新查询。
我没有知道如何找到获得这个值的方法,每次我点击编辑按钮(我用javascript提交)。
谢谢求助。 c> GET 每行中的HTTP方法:
< a href =[URL]? id = [id]>< img src =edit.gif/>< / a>
其中:
-
网址
是您向此表单提交
的网址, -
id
是您使用id_+ nomTab +_+ compteur创建的内容
in a html table i construct in each row an edit button like the following:
retour.append("<input type=\"hidden\" id=\"id_"+nomTab+"_"+compteur+"\" value=\""+object.getIdDailyTimeSheet()+"\" name=\"hd_"+compteur+"\" />");
this is the hidden type then i do the following:
retour.append("<button id=edit name=edit type=button onClick= editarow()>");
retour.append("<img src=edit.gif />");
retour.append("</button>");
retour.append("</td>");
here i am using the hidden type to differentiate between my rows with it. Now I am trying to get the parameter called here: value=\""+object.getIdDailyTimeSheet() in my servlet to do an update query based on the IdDailyTimeSheet. I didn't until know find the way to get this value every time i click the edit button (i do its submit with the javascript).
thanks for help.
You can send the id
parameter with the GET
HTTP method in each row:
<a href="[URL]?id=[id]"><img src="edit.gif"/></a>
where:
URL
is the URL to which you submit this form to andid
is what you build with "id_" + nomTab + "_" + compteur
这篇关于正确地从隐藏类型获取值的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!