将表单内容放在JSP页面中的麻烦

时间:2013-12-05 11:30:07

标签: html jsp

我在放置用于浏览文本的表单时遇到了困难。我有一大堆文本假设出现在页面中间,两个缩进形式假设出现在文本的上方和下方。问题是两种形式都出现在文本上方 我试过使用页脚标签,但它没有用。这是jsp

<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="windows-1255"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html dir="rtl" lang="he">
<head>
<title>Unity Zohar</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8\">
<link type="text/CSS" href="ErrorStyle.css" rel="stylesheet"/>
<link type="text/CSS" href="TextStyle.css" rel="stylesheet"/>
</head>
<body>

    <h4>Zohar Portion Name: ${bean.parashaName}, paragraphs: ${bean.paragNum}, #of paragraphs: ${max}</h4>

    <form action="ReadZohar" method="get">
        <input type = "hidden" id = "command" name ="command" value = "read"/>
        <input type = "hidden" id = "block" name ="block" value = "1"/><br>
        פרשה: <select id = "parasha" name="parasha" onchange="this.form.submit()">
        <c:forEach  var = "pbean" items = "${list}">
        <option value="${pbean.number}"${pbean.number == lastPick ? 'selected' : ''}>${pbean.name}</option>
        </c:forEach>
        </select>
        <br>
        <input type="submit" value="previous" onclick="previous()">
        <input type="submit" value="forward">
    </form>


    ${bean.text}



    <form action="ReadZohar" method="get">
        <input type = "hidden" id = "command" name ="command" value = "read"/>
        <input type = "hidden" id = "block" name ="block" value = "1"/><br>
        פרשה: <select id = "parasha" name="parasha" onchange="this.form.submit()">
        <c:forEach  var = "pbean" items = "${list}">
        <option value="${pbean.number}"${pbean.number == lastPick ? 'selected' : ''}>${pbean.name}</option>
        </c:forEach>
        </select>
        <br>
        <input type="submit" value="previous" onclick="previous()">
        <input type="submit" value="forward">
    </form>

<script type="text/javascript">
function previous(){
    document.getElementById("block").value = "-1";
}
</script>
</body>
<div class="errMsg">${error}</div>
</html>

1 个答案:

答案 0 :(得分:1)

HTML Markup

您缺少代码中的结束</table>标记,导致表容器合并到第二个表单容器中。

希望这有帮助。