Sponsored link


改行コードについて
めんどうなことに、OSによって改行が違います。
なのでJavaScriptを使うときには改行コードを意識したプログラムをしないと
文字列の分割でうまくいかないことがあります。
ファンクション
function getReturncode(){ var theAgent=navigator.userAgent if (theAgent.indexOf("Win") >=0){ return "\r\n" } else if(theAgent.indexOf("Mac") >=0){ return "\r" } else { //for Unix User return "\n" } } #commons1

