Hello everyone I would like to send div id as data with ajax. As you can see at below I’m trying send only “fallout”
<script type="text/javascript">
var mydiv = $("#fallout").html();
$.ajax({
type: "get", url: "test", data: { mydata: mydiv },
success: function (data) {
$("#font).html(data);
}
});
</script>
Here is my div
<div id="fallout"><p id="font>"Test</p></div>
But it returns as null
Try this: