开发者

HTML/JSP Variables

开发者 https://www.devze.com 2023-03-26 18:37 出处:网络
I am wondering is there anyway to define a variable in HTML/JSP. I goo开发者_运维知识库gled very hard but couldn\'t find any resources on this. Basically in my html/jsp I am trying to save an external

I am wondering is there anyway to define a variable in HTML/JSP. I goo开发者_运维知识库gled very hard but couldn't find any resources on this. Basically in my html/jsp I am trying to save an external value into a variable that's specific to the html/jsp, so that I can print this variable to the webpage afterwards. Let's say this external value is 5. Can we do something like

x=5 ?

T


Do you mean something like this?

<c:set var="x" value="5"/> 
...
${x}

<c:set> is a tag from the JSTL.

0

精彩评论

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

关注公众号