<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>

<script>
function ekle(){
    var mesajlar = $('input[name=mesaj]').val();
    alert(mesajlar);
}
</script>


<?php
/**
 * @author Lithack
 * @copyright 2012
 */




?>
<input type="text" name="mesaj"  onkeypress="ekle()"/>