$(function(){ $("#content").bind("input change", function(){ $.post("/getHtml", {md: $(this).val()}, function(resp){ $("#md").html(resp.html); }); }) });