This commit is contained in:
Boof 2023-04-28 10:13:25 +02:00 committed by GitHub
parent 5621439290
commit 45d7450bf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<script src="index.js"></script>
<body>
<textarea id="textInput"></textarea>
<button id="processButton">Process</button>
</body>
</html>

View File

@ -0,0 +1,8 @@
const textInput = document.getElementById("textInput");
const processButton = document.getElementById("processButton");
processButton.addEventListener("click", function () {
const inputText = textInput.value;
const lines = inputText.split(/[\n\r]+/);
console.log(lines);
});