g:全域比對(Global match) i:忽略大小寫(Ignore case) gi:全域比對並忽略大小寫*/ var str = '#2'; str.replace(/#/gi,"1"); //將str的#取代為1.
確定! 回上一頁