samar
Number conversion in JavaScript
1 Answer(s)      6 years and 5 months ago
Posted in : JavaScript Questions

How do you convert numbers between different bases in JavaScript?

November 8, 2010 at 12:21 PM

hi,

Use the parseInt() function, that takes a string as the first parameter, and the base as a second parameter. So to convert hexadecimal 5F to decimal, use parseInt (?5F?, 16); .

Thanks.

Number conversion in JavaScript
Number conversion in JavaScript  How do you convert numbers between different bases in JavaScript
javascript conversion
javascript conversion  how to convert war file into dll file
javascript integer to string conversion
javascript integer to string conversion  How to Javascript Integer to String Conversion   <script type="text/javascript">...); // 123 number // Step (3) Add 123 + 100 = 223 result = result + 100
javascript max number - Java Beginners
javascript max number  hi all, i m trying to find maximum number in javascript but its not working dont know why, and heres the code: var number,i,max; for(i=1;i<11;i++) { number=prompt("Enter
JavaScript for decimal number comparisons - Java Beginners
JavaScript for decimal number comparisons  Hi, I need to compare a BigDecimal in my javascript. I need a have a validation the text field value should not exceed (15,2) (max value is : 9999999999999.99). I am not able
Javascript random number - Design concepts & design patterns
Javascript random number  Dear Sir, I have a table with many... have a table for students' details in a school.unique is their roll number... to place equal number of students under one lot number.Then same numbers under
String Number Operations in JavaScript
String Number Operations in JavaScript  ... of JavaScript and create your first JavaScript program.  What is String Number... the conversion of a string to a number might entail performing a mathematical
Javascript random number - Design concepts & design patterns
Javascript random number  Dear Sir, I have a table with many coloumns with one coloumn as vacant corresponding to every row.All coloumns are retreived from database.I have to generate random numbers corresponding to every
how to validate the telephone number without using jquery in html with javascript
how to validate the telephone number without using jquery in html with javascript  how to validate the telephone number without using jquery in html with javascript
conversion Applet
conversion Applet  I am a java beginner.................. strong texthow to create JApplet that prompts the user to enter a distance in miles... kilometers,where XX.XX is the number of kilometers. A mile is 1.6 kilometers
JavaScript Array of number
JavaScript Array of number     ... in understanding Java Script array number of elements. We are using JavaScript...;   <script language="javascript" type="text
Mobile Number Validation Form in JavaScript
Mobile Number Validation Form in JavaScript In this example we have created a Mobile Number Validation Form that displays the Mobile Number, Phone... Number to 10 digits and Phone Number to 10 Digits. We have also used Java
currency conversion
currency conversion   hi frds.. I wan jsp code to convert currency in different formats??... if u know plz plz plz post it   Please visit the following link: http://www.roseindia.net/tutorials/I18N/currency
image conversion tools
image conversion tools  how many tools are available in image conversion at particularlly in java
JAVASCRIPT
JAVASCRIPT  I have one textbox and I want to validate that it must start with number(1-0). can anyone tell me a javascript for that ? thanks in advance
javascript
javascript  hi, I was actually working on to calculate the number of days between two dates of yyyy-mm-dd format using javascript, and when i click on button then number of days should be display in textbox
Javascript calculate number of days between two dates
Javascript calculate number of days between two dates In this tutorial, you will learn how to calculate number of days between two dates.For this, you need.... The desired interval can then be determined by dividing that number
Javascript
this format xxx-xxx-xxxx, i want the code in javascript. as a function.   Javascript Phone Number Validation <html> <script> function..." method="post" onsubmit="javascript:return validate();"> Phone Number:<
JavaScript toPrecision method
JavaScript toPrecision method       In JavaScript, toPrecision() method is used to convert a number into the number with the number of digits as provided for the precision. Syntax
JavaScript Math.sin() method
JavaScript Math.sin() method       JavaScript's Math.sin() method returns mathematical sine of the number and it returns value between -1 to 1. Syntax:  Math.sin( value
.wav file conversion
.wav file conversion   how to read .wav file and converd the data into text format
conversion of language in a project
conversion of language in a project  how can we convert the database code in the project dynamically
JavaScript
JavaScript  clone JavaScript
NSString to float conversion
NSString to float conversion  HI, I my iPhone and iPad application I have to convert NSString to float. Provide me example of NSString to float conversion. Thanks   Hi, Please see NSString to float conversion
object conversion - Java Beginners
object conversion   Hi, Can anybody tell me the object conversion in java.   Hi sandeep Can u please tell me in details about your.../java-conversion/ObjectToDouble.shtml Thanks... sandeep kumar suman
javascript
Javascript
Javascript  How validations are done using javascript ,with example? and interview questions on javASCRIPT
Conversion - Development process
is the theory of conversion from java to .NET? How it is done?   Hi... Conversion Assistant (JLCA). Code that calls Java APIs can convert to comparable C# code... to a topic with guidelines for modifications needed to finish the conversion
NSString to float conversion
NSString to float conversion  HI, I my iPhone and iPad application I have to convert NSString to float. Provide me example of NSString to float conversion. Thanks   HI, Use the following code: NSScanner *strXpos
Tutorials