■ソースコード
			str = "ABCDEFGHIJK";
			txt = "AB,CD,EF,GH";
			chr = str.charAt(0);
			alert(chr);
			chr = str.substring(5,7);
			alert(chr);
			chr = str.substr(5,3);
			alert(chr);
			chr = str.slice(5,-1);
			alert(chr);
			chr = str.split(",");
			alert(chr.toString());
■ポイント
			 書式は以下のようになります。
対象文字列.charAt(位置)
			対象文字列.substring(開始位置,終了位置)
			対象文字列.substr(開始位置,抽出文字数)
			対象文字列.splice(開始位置,終了位置)
			対象文字列.split(排除文字列)
サンプルをダウンロード
目次へ戻る