开发者

pass value to servlet from a hidden input type

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.getIdDailyTimeS开发者_运维百科heet() + "\"/>");
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] ..");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜