저는 자바 스크립트를 처음 사용합니다.JavaScript - Chrome이나 FF가 아닌 IE에 표시되는 결과
어쨌든 Internet Explorer에서는 작동하지만 Chrome이나 FF에서는 작동하지 않는 다음 코드가 있습니다. Reddit RSS에서 데이터를 가져 와서 출력합니다. 바로 그 것입니다. IE에서만 작동합니다. 아무도 내가 여기서 잘못하고있는 것을 설명 할 수 있습니까?
<html>
<head>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
var result = null;
$.ajax({
url: "http://www.reddit.com/.rss",
type: 'get',
dataType: 'html',
async: false,
success: function(data) {
result = data;
}
});
document.write(result);
</script>
</head>
</body>
</html>
HTML이 올바르게 구성되지 않았습니다. 닫는 body 태그 안에 닫는 head 태그가 있습니다. –