Edit in JSFiddle

$(document).ready(function() {
    $('#new-status form').submit(function(e) {
        e.preventDefault();

        var text = $('#new-status').find('textarea').val();
        $.ajax({
            url: '/echo/json/',
            type: 'POST',
            dataType: 'json',
            data: { text: text, json: JSON.stringify({'text': text }) },
            success: function(data) {
                var $li = $('<li>', {'text': data.text});
                
                $('#statuses').append($li);
                $('#new-status').find('textarea').val('');
            }
        });
    });
});
<div id="new-status">
    <form>
        <textarea id="new-status"></textarea>
        <button type="submit">Add</button>
    </form>
    <ul id="statuses"></ul>
</div>

              
            
          
            
              

External resources loaded into this fiddle: