JavaScript를 처음 접했습니다. 프로토 타입을 시험 할 때 여기에 문제가 있습니다.Ajax.updater problem
로드 된 후 sample.jsp를 Ajax.updater로 업데이트하려고하지만 작동하지 않습니다. 여기 smaple.jsp의 소스.
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<script src="prototype.js"></script>
<script>
function f1(){
var ajax = new Ajax.updater(
{success: 'state'},'part.html'
,{method:'get'});
}
document.observe('dom:loaded', function() {
f1();
});
</script>
</head>
<body>
state:
<div id="state"></div>
<br>
</body>
</html>
아무도 내 코드에 문제가 있다고 말할 수 있습니까?
@ Yonatan, "Updater"를 "Updater"로 변경 한 후에도 여전히 실패했습니다. 조언 해 주셔서 감사합니다. 방화 광을 설치했으며 자바 스크립트 코드 줄에 중단 점을 설정할 수 있지만 내 경우에는 디버그하는 방법을 모르겠습니다. 수행 방법을 알려주시겠습니까? – eric2323223
@ eric2323223 : 방화 광 콘솔에 GET 요청이 표시됩니까? 라이브 http 헤더 플러그인 (https://addons.mozilla.org/en-US/firefox/addon/3829)을 사용하지 않을 수도 있습니다. 요청이 전송되는지 확인하십시오. (또는 서버를 디버깅하여 점검/로그 검사) –
@Yonatan, 예, 방화범 입력기에서 GET 요청을 보았습니다. 다음에 무엇을해야합니까? – eric2323223