Edit in JSFiddle

$(document).ready(function() {
         $('input.AutoSelectAll').live("click", function() {
                $(this).select();
            });
});
<input class="AutoSelectAll" value="Auto selects all text">
.AutoSelectAll {
border: 1px solid #C8C8C8;
border-radius: 5px;
padding: 3px;
padding-left: 8px;
}