开发者

JSPX scriplet inside HTML input type textbox

开发者 https://www.devze.com 2022-12-21 12:36 出处:网络
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 scriptle

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

精彩评论

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