update
This commit is contained in:
parent
1f1ad49427
commit
6f050a029e
2496 changed files with 37609 additions and 3031 deletions
|
|
@ -1,6 +1,9 @@
|
|||
function isNumeric(n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||
}
|
||||
var value = "123.45e7"; // Assign string literal to value
|
||||
if (isFinite(value)) {
|
||||
if (isNumeric(value)) {
|
||||
// value is a number
|
||||
}
|
||||
//Or, in web browser in address field:
|
||||
// javascript:value="123.45e4"; if(isFinite(value)) {alert('numeric')} else {alert('non-numeric')}
|
||||
// javascript:function isNumeric(n) {return !isNaN(parseFloat(n)) && isFinite(n);}; value="123.45e4"; if(isNumeric(value)) {alert('numeric')} else {alert('non-numeric')}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue