Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html>
<body>
<input value="foo">
<script>
var i = document.querySelector("input");
i.focus();
i.selectionStart = 1;
i.selectionEnd = 2;
</script>
</body>
</html>