<textarea id='message'>
1行目
2行目
3行目</textarea>
const message = document.getElementById('message').value;
console.log(message);
const messages = message.split(/\n/);
console.log(messages);
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.