Extract Test from String Javascript -
var = "usd:12.34";
umm...so variable , want extract word usd , assign var b in javascript
split string literal on :
character , retrieve first element in array.
var = "usd:1234"; var b = a.split(":")[0];
working example: http://jsfiddle.net/cxdqc/
javascript
No comments:
Post a Comment