Select all contents of textbox when it receives focus (Vanilla JS or jQuery)

$(document).ready(function() {
    $("input:text").focus(function() { $(this).select(); } );
});

Leave a Comment