How come doesn’t
$('#submit').click(function(){
$.post('PHP/script.php', $('#form').serialize(), function(data){
$(document).html(data);
});
});
refresh the entire page when script.php in this case would return e.g.:
echo '<p>Some text</p>';
?
Replace
by
You can’t replace the document without reloading it, only its content.