SyntaxFix
Write A Post
Hire A Developer
Questions
You can always use document.execCommand (supported in all major browsers)
document.execCommand
document.execCommand("selectall",null,false);
Selects all text in the currently focused element.