Convert "asdf123" to integer with parseInt() in JavaScript
Description
The following code shows how to convert "asdf123" to integer with parseInt().
Example
<!-- ww w . j a va2s . co m-->
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
document.writeln(parseInt("asdf123"));
</script>
</head>
<body>
</body>
</html>
The code above generates the following result.
Javascript Tutorial Number parseInt
Convert "123asdf" to integer with parseInt(...
Convert one value to int with different rad...
Convert string to create an integer value w...
Covert value to int with radix in JavaScrip...
Covert value without 0x to int with radix 1...
Use parseInt() to convert float point value...
Use parseInt() to convert hexadecimal forma...
Use parseInt() to convert octal format valu...
Convert "123asdf" to integer with parseInt(...
Convert "asdf123" to integer with parseInt(...
Convert empty string("") to integer with pa...Convert one value to int with different rad...
Convert string to create an integer value w...
Covert value to int with radix in JavaScrip...
Covert value without 0x to int with radix 1...
Use parseInt() to convert float point value...
Use parseInt() to convert hexadecimal forma...
Use parseInt() to convert octal format valu...