HTML
1
Вклад в тег
.box {
border: solid 1px #dddede;
.box {
border-left: solid 1px #dddede;
}
.item:nth-child(-n+2) {
border-top: 1px #dddede solid;
}
<input type = "text" id = "source" />
<button id = "send" type = "button">Отправить</button>
<div id = "result"></div>
$(document).ready(function(){
$("#send").click(function(){
var fd = new FormData();
fd.append('data', $('#source').val());
$.ajax({
type: "POST",
url: "/ajax.php",
data: fd,
contentType: false,
cache: false,
processData: false,
success: function(msg) {
$('#result').html(msg);
}
})
});
});
echo $_POST['data'];