View Full Version : how to use the strip facility??
03-11-2004, 04:39 PM
With this i want to do calulations and my website will validate to XHTML Strict
fanx in advance
03-11-2004, 07:11 PM
Since I don't know what your variables are called, I'm going to assume they're in fact called cell1, cell2, ...
I'm not going to use strip, I think charAt is better in this case. substring could also be used...
var cell_id1 = cell1.id;
var num1 = parseInt(cell_id1.charAt(4));
Now num1 should hold 1. parseInt will convert the string '1' to the integer 1.
Hope that helps,
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.