将值从隐藏的输入类型传递给servlet [英] pass value to servlet from a hidden input type
问题描述
我试图将隐藏输入类型中名为 value
的参数传递给我的servlet。
就是这样:
$ $ p $ retour.append(< input type = \hidden'\\ id = \id_+ nomTab +_+ compteur +\value = \+ object.getIdDailyTimeSheet()+\/>);
retour.append(< button id = edit name = edit type = submit onClick = editarow()>);
retour.append(< img src = edit.gif />);
retour.append(< / button>);
retour.append(< / td>);
但get方法的get参数推荐一个名称,以便能够在此获取值。
那么我该如何处理呢?在这里,我想将 object.getIdDailyTimeSheet()
的值传递给servlet。
retour.append(。 。name = [field_name] ..);
I am trying to pass the parameter called value
in the hidden input type to my servlet.
It is like that:
retour.append("<input type=\"hidden\" id=\"id_" + nomTab + "_" + compteur + "\" value=\"" + object.getIdDailyTimeSheet() + "\"/>");
retour.append("<button id=edit name=edit type=submit onClick= editarow()>");
retour.append("<img src=edit.gif />");
retour.append("</button>");
retour.append("</td>");
But the method get parameter recommend a name to be able to get the value here.
So how can I deal with it? Here I want to pass to the servlet the value of object.getIdDailyTimeSheet()
.
You need to add a "Name" attribute to your Hidden field as:
retour.append(".. name=[field_name] ..");
这篇关于将值从隐藏的输入类型传递给servlet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!