Jsp 在struts中,如何设置html:hidden的id属性

Jsp 在struts中,如何设置html:hidden的id属性,jsp,struts,Jsp,Struts,我想在我的html表单中添加一个隐藏的输入,并使用下面的struts标记进行操作: <html:hidden property="currentPage" value="page1"></html:hidden> 这将呈现此html: <input type="hidden" value="page1" name="currentPage"> 如何设置html元素的id属性?因此,我希望html呈现为: <input type="hidden

我想在我的html表单中添加一个隐藏的输入,并使用下面的struts标记进行操作:

<html:hidden property="currentPage" value="page1"></html:hidden>

这将呈现此html:

<input type="hidden" value="page1" name="currentPage">

如何设置html元素的id属性?因此,我希望html呈现为:

<input type="hidden" value="page1" name="currentPage" id="currentPage">

试试这个:

<html:hidden property="currentPage" value="page1" styleId="currentPage"></html:hidden>


最后,我无法让它工作。你确定这有用吗?对我有用。。样式id将转换为HTML id属性