Content-Length: 298832 | pFad | http://github.com/roeib/JavaScript-snippets/commit/48afc0ddd55ad4258b441977bea3d34cefe43173
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b5e313 commit 48afc0dCopy full SHA for 48afc0d
README.md
@@ -38,6 +38,8 @@
38
|32 | [The void operator](#The-void-operator)|
39
|33 | [replaceAll](#replaceAll)|
40
|34 | [Required Function Params](#Required-Function-Params)|
41
+|35 | [Get input value as a number](#Get-input-value-as-a-number)|
42
+
43
44
45
**[⬆ Back to Top](#table-of-contents)**
@@ -737,4 +739,18 @@ console.log(getPage());
737
739
738
740
741
742
+**[⬆ Back to Top](#table-of-contents)**
743
+### Get input value as a number
744
745
+```javascript
746
747
+<input type="number" id="JSsnippets" onkeyup="checkMyType(event)" />
748
749
+function checkMyType(event){
750
751
+ console.log(typeof event.target.value) // string
752
+ console.log(typeof event.target.valueAsNumber ) // number
753
754
+}
755
756
+```
Fetched URL: http://github.com/roeib/JavaScript-snippets/commit/48afc0ddd55ad4258b441977bea3d34cefe43173
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy
0 commit comments