Learn free online HTML5, javascript, and jquery Tutorials by Examples

Sunday 21 December 2014

Highlight text on focus for all input textboxes using jQuery

<input type="text" value="satish" />
<script src="jquery.js"></script>
<script>
    $(document).ready(function(e) {
        $('input:text').focus(function(e) {
            $(this).select();
        });
    });
</script>

No comments:

Post a Comment