网页定位问题

问题:一个网页显示了10道题,我看到第8道,发现它有错误,通过修改按钮进行修改,修改完后跳回刚才的显示页面,它会跳到页面顶端,我想让它跳回后显示在第8题的位置.

解决:用锚实现
显示题目列表的文件
<c:forEach items="${questionSearchResult}" var="question" varStatus="current">
        <tr>
       <a id="${question.questionId}"></a>          <td>${question.questionId}</td>
          <td>${question.questionName}</td>
          <td>${question.quesOptions}</td>
          <td>${question.rightKey}</td>
          <td>${question.questionType}</td>
          <td>${question.stateTag}</td>
          <td>${question.schoolName}</td>
          <td>${question.subjectName}</td>
          <td>${question.quesMakeDate}</td>
          <c:if test="${question.stateTag=='可用'}">
          <td><A href="modifyQuestion.do?action=changeState&questionId=${question.questionId}&order=${question.questionId}">置为不可用</A></td>
          </c:if>
           <c:if test="${question.stateTag=='不可用'}">
          <td><A href="modifyQuestion.do?action=changeState&questionId=${question.questionId}&order=${question.questionId}">置为可用</A></td>
          </c:if>
          <td><A href="modifyQuestion.do?action=getQuestion&questionId=${question.questionId}& order=${question.questionId}">修改题目</A></td>
        </tr>
        </c:forEach>
修改的页面
<tr>
    <td align="center"><input type="submit" name="Submit" value="修改">< input type="hidden" name="order" value=" ${param.order}"></td>从URL参数中获得值
  </tr>
修改的action
String order=request.getParameter("order");
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String toPage=basePath+"jsp/topManager/questionManage/queryQuestionResults.jsp #"+order;
     return new ModelAndView(new RedirectView(toPage));

你可能感兴趣的:(jsp)