// 轉義特殊字符<>;,"" function transSpecialCharacter(variable){ var temp = variable.replace(">",">").replace("<","<").replace("'","'").replace('"','"'); return temp; }