搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Javascript string split function does not recognize "\r" character.

  • 無回覆
  • 3 有這個問題
  • 8 次檢視
more options

I have a web page that uses a javascript function to parse a data file with each record delimited by /r/n. The function uses the string SPLIT method with the record delimiters /r/n to parse the records into an array. It works perfectly in Firefox version 3.6.19 but the same function fail in version 5.0.1.

I have a web page that uses a javascript function to parse a data file with each record delimited by /r/n. The function uses the string SPLIT method with the record delimiters /r/n to parse the records into an array. It works perfectly in Firefox version 3.6.19 but the same function fail in version 5.0.1.