How to focus and select all using javascript. This snippet shows it in an example of "jQuery: Toggle input text using checkbox". For an example you can extend this to any event or action where you need to show prefilled text input.
Source code viewer
}) }); Programming Language: jQuery