同上
---------------------------------------------------------------
replace(string," ","")应该可以吧
trim()
---------------------------------------------------------------
JAVASCRIPT中用
string.replace(/ */g,"")
---------------------------------------------------------------
PHP函數 $str_result=trim(str_replace(" ","",$sourcestring));