开发者

JSPX scriplet inside HTML input type textbox

I have the following in my jspx file:

<jsp:scriplet>
   int myvar = 2;
</jsp:scriptlet>

How can I 开发者_JAVA百科put variable myvar into a textbox (id=myinput) value using JSTL or scriptlet (I can do this using session variable)

<input type="text" id="myinput" value="...the value of myvar..."/>

Thanks


<input type="text" id="myinput" value="<%=myvar%>"/>


Just a little typo in previous answer. Please use like this

<input type="text" id="myinput" value="<%=myvar%>"/>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜