blob: b197d3cd49cddf24ed2dbc03a7aa4e8bb13880c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
<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>
|