Home Tutorialhelp Comment To Trim() JavaScript var

 
 

Comment

Lavanya
To Trim() JavaScript var,
December 2, 2008 at 12:48 AM

<% List videoFileTypes = display.getVideoExtnTypes(); %>

var videoFileTypes = new Array();
videoFileTypes='<%=videoFileTypes%>';
var v1=videoFileTypes.replace("[","");
var v2=v1.replace("]","");
var v4 = v2.replace(/\s+/g,''); //to trim the Array just use this expression.
var v3=v4.split(",");
View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
Advertisements Advertisements
 

 

 

DMCA.com