From 45d7450bf4470941ba054cf57263a120bbafe1f4 Mon Sep 17 00:00:00 2001 From: Boof <97455552+hexahigh@users.noreply.github.com> Date: Fri, 28 Apr 2023 10:13:25 +0200 Subject: [PATCH] e --- other/urls to array/index.html | 11 +++++++++++ other/urls to array/index.js | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100644 other/urls to array/index.html create mode 100644 other/urls to array/index.js diff --git a/other/urls to array/index.html b/other/urls to array/index.html new file mode 100644 index 0000000..7840aeb --- /dev/null +++ b/other/urls to array/index.html @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/other/urls to array/index.js b/other/urls to array/index.js new file mode 100644 index 0000000..7aebe9a --- /dev/null +++ b/other/urls to array/index.js @@ -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); +});