Witam, chciałem wpisać tekst (dokładnie to co przyszło z pliku skrypt.php) za pomocą JavaScript do div'a o id=table. W linii 32 wstawiałem już funkcje .append(); i przez .getElementById ale coś nie działa.
<!DOCTYPE HTML>
<html lang="pl">
<head>
<title>Test</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<script src="jquery-1.11.3.min.js"></script>
<link href="css/fontello.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form>
<input id="id_home" type="text"/>
<input id="submit" type="submit"/>
</form>
</br></br>
<div id="table"> 123 </div>
</body>
<script type="text/javascript">
$("#submit").on('click',function()
{
var content = document.getElementById("id_home").value;
//alert(content);
$.ajax({
url: 'skrypt.php',
type: 'post',
data:{ksiazka: content},
success: function(response)
{
//alert(response);
//o tutaj chciałem wpisać funkcję która wpisze do div'a table to co jest w zmiennej response.
}
});
});
</script>
</html>