开发者

in struts how do you set the id property for html:hidden

开发者 https://www.devze.com 2023-03-20 08:22 出处:网络
I want to put a hidden input onto my html form and am doing so with the following struts tag: <html:hidden property=\"currentPage\" value=\"page1\"></html:hidden>

I want to put a hidden input onto my html form and am doing so with the following struts tag:

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

which renders this html:

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

How do I set the id property on the html element? So I want the html to be rendered like:

<input typ开发者_开发技巧e="hidden" value="page1" name="currentPage" id="currentPage">


Try this:

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

精彩评论

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