前端知識分享

一、判斷變量的類型: typeof(data) === "類型"? true : false; 二、2-一、去除字符串空格:  去除全部空格:str = str.replace(/\s*/g,"");  去除兩頭空格: str = str.replace(/^\s*|\s*$/g,"");  去除左空格:str = str.replace(/^\s*/,"");  去除右空格:str str.re
相關文章
相關標籤/搜索