Auto select input text

// Javascript app = {}; app.autoSelectInput = function () { window.onload = function () { var input = document.getElementById('search'); input.onclick = function () { this.select(); }; }; }; app.autoSelectInput(); // HTML ... <input type="text" id="search" value="Search"> ...

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.