Posted by Toby Inkster on 02/27/06 16:30
David Graham wrote:
> I just ran the javascript you posted to see it work. When I put in 4 + 3 I
> get an answer of 43 - is that what you intended?
Not really -- posted without testing.
You can use the parseInt() function to convert from a string to an integer.
e.g.
var A = parseInt(document.getElementById('a'));
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Navigation:
[Reply to this message]
|