• Post Reply Bookmark Topic Watch Topic
  • New Topic

HTML Body tag within If condition  RSS feed

 
Ananya Gopal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is it possible in html to have the body tag within if condition??
My idea is something like:
<%if(condition){ %>
<body onLoad... >
<%} else { %>
<body>
<% } %>

Thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happened when you tried it? and why are you using script let JSP technology that's been replaced over 10 years ago?
 
Ananya Gopal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:What happened when you tried it? and why are you using script let JSP technology that's been replaced over 10 years ago?


I haven't used anything yet.. I just would like to know if this concept(of using an if condition for <body>) is possible in HTML. and if yes, how?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Best way to find out is to try it yourself. Or are you just here to get everyone else to do your work?

Why would you not want the HTML page to end up with body tags?

And for conditionals in a modern JSP page, you would use JSTL, not scriptlets.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!