Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<style>
input:focus { counter-increment: c; }
</style>
<script>
function onLoad() {
// For emulating the traditional behavior, collapse Selection to end of the
// text node at end of the <body>, i.e., end of the text node after the
// <input contenteditable>.
getSelection().collapse(document.body, document.body.childNodes.length);
document.querySelector("input[type=number][contenteditable]").select();
}
</script>
<body onload="onLoad()">
<input type="number" contenteditable>
</body>