게시판 즐겨찾기
편집
드래그 앤 드롭으로
즐겨찾기 아이콘 위치 수정이 가능합니다.
jsp 질문입니다 도와주세요 ㅠㅠ
게시물ID : programmer_17917짧은주소 복사하기
작성자 : 노랑사과
추천 : 1
조회수 : 322회
댓글수 : 3개
등록시간 : 2016/07/17 13:36:53
옵션
  • 본인삭제금지
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
<html>
<head>
<title></title>
<script type="text/javascript">
function chk(){
location.href = "viewdetail.do;
}
</script>
</head>
<body>
<div align="center">
<h3>${MS_DTO.title}</h3><br>
<c:if test="${MS_DTO != null}">
<form>
<select name="no">
<c:forEach var="ml" items="${MSList}">
<option onclick="chk(${ml.no})">
 ${ml.title} 
</option>
</c:forEach>
</select>
</form>
</c:if>

<%@ include file="footer.jsp" %>

option을 클릭하면 chk()가 발생해서 저 viewdetail.do로 이동하려고 하는데 onclick이 안되는지 확인해볼려고 location.href = "viewdetail.do"; 대신에 alert("1")을 써봤는데 alert도 발생하지 않더라구요 ㅠㅠ script를 <c:forEach var="ml" items="${MSList}"> 안에 넣어도 안되구요.. 다른분이 이것과 비슷하게 했을 때는 잘 되던데 왜 제꺼는 안되는지 모르겠네요..
전체 추천리스트 보기
새로운 댓글이 없습니다.
새로운 댓글 확인하기
글쓰기
◀뒤로가기
PC버전
맨위로▲
공지 운영 자료창고 청소년보호