【发布时间】:2016-01-24 23:10:55
【问题描述】:
我制作了 header.jsp 和 footer.jsp 来制作动态页面。在积累的代码中,JavaScript 没有运行。
<html>
<head>
<title>CAN Invoicing</title>
</head>
<body>
<div style="top:10;height:200px;">
<div style="float:left;">
<a href="/"><img src="/images/Amazon-CAN-Logo.png" alt="CAN INVOICING"></img></a>
</div>
<div style="float:right;top:200px;">
<img src="/images/logo_csmetrics.gif" alt="Powered By CSBI"><img>
</div>
</div>
<div style="top:200px;">
<h1>you are authorized login User ::null</h1>
<script type="text/javascript">
function doTest()
{
alert("hello");
}
</script>
<h2>Session username swasri</h2>
<a href="/test/"target="_blank">test</a>
<a href="/upload/" target="_blank">uplaod</a>
<a href="/uploadS3/" target="_blank">s3</a>
<a href="/readS3/" target="_blank">downloadS3</a>
</div>
<div><p>footer</p></div>
</body>
</html>
动态部分从<h2> 开始直到页脚div。我正在使用 tomcat apache 服务器来运行上面的代码。所有的 jsps 都保存在 webapp 文件夹中。
我在 tomcat apache webserver 中运行上面的代码。
【问题讨论】:
-
如果你的意思是不工作,
alert没有出现,你可以考虑调用doTest()来运行函数。 -
你在哪里调用那个脚本?
-
</img>结束标签有什么用?
标签: javascript java jsp