简体   繁体   English

JSP中的页眉,页脚,左侧和右侧模板

[英]Header, Footer, Left and Right side Template in JSP

Developing a WebPage with Footer, Header and Left column. 用页脚,页眉和左侧列开发网页。 Below is main.jsp code 下面是main.jsp代码

<table>
    <tr valign='top'><td><%@include file='leftside.jsp'%></td>
    <td><table>
    <tr><td><%@include file='header.jsp'%></td></tr>
    <tr><td>Content</td></tr>
    <tr><td><%@include file='footer.jsp'%></td></tr>
    </table>
    </td>
    </tr>
</table>

The leftside.jsp code is below leftside.jsp代码如下

<body bgcolor=blue>
Leftside
</body>

On running main.jsp , I only get the text as Leftside. 在运行main.jsp ,我仅将文本显示为Leftside。 The background color of blue is not displayed. 不显示蓝色的背景色。 Am i missing anything? 我有什么想念的吗? Thanks. 谢谢。

Please use the apostrophes "" and it will work fine 请使用撇号"" ,它将正常工作

<body bgcolor="blue">
Leftside
</body>

Try to use this: 尝试使用此:

 <body style="background-color:blue;">

Or with adding the apostrophes "blue" : 或添加撇号"blue"

 <body bgcolor="blue">

Instead this: 相反,这是:

<body bgcolor=blue>  

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM