JavaScript аналог php trim
var trim = function( str ){ return (typeof str=='string')?str.replace(/^[\s\n\r]+/,'').replace(/[\s\n\r]+$/,''):str; };
JavaScript аналог php trim
var trim = function( str ){ return (typeof str=='string')?str.replace(/^[\s\n\r]+/,'').replace(/[\s\n\r]+$/,''):str; };