回答編集履歴
1
コードを一部修正
answer
CHANGED
@@ -5,8 +5,8 @@
|
|
5
5
|
let text = document.querySelector("#textin1").value;
|
6
6
|
|
7
7
|
//テキストを分割
|
8
|
-
text1 =
|
8
|
+
text1 = text.slice(0,5);
|
9
|
-
text2 =
|
9
|
+
text2 = text.slice(5,10);
|
10
10
|
|
11
11
|
//テキストをHTMLに入れる
|
12
12
|
document.querySelector("#textin1").innerHTML = text1;
|