В одной папке лежат ajax.html и response.html
Почему-то ajax запрос из первого на второй выдает ошибку (Crap!):
Содержимое ajax.html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>JS BASICS</TITLE>
<LINK rel = "stylesheet" type = "text/css" href = "style.css" </LINK>
</HEAD>
<BODY>
<script type = "text/javascript" src = "jquery-1.11.2.js">
</script>
<script type = "text/javascript" >
$.ajax({
url: "response.html",
success: function(){
alert('Cool!');
},
error:function(){
alert("Crap!");
}
});
</script>
</BODY>
</HTML>
Содержимое response.html:
response is done.