mozilla
Your Search Results

    HTMLInputElement.select()

    This article is in need of a technical review.

    The HTMLInputElement.select() method focuses an element and selects all the text in it. For instance:

    var myInput = document.getElementById('era');
    myInput.select();

    .. is like:

    var myInput = document.getElementById('era');
    myInput.focus();
    myInput.setSelectionRange(0, 9999);

    See also

    Document Tags and Contributors

    Contributors to this page: kscarfone, Krinkle, fscholz
    Last updated by: fscholz,
    Hide Sidebar