skip to Main Content

Html – JavaScript parsing error giving the wrong output, not considering if text is in the next line

Consider: document.addEventListener("DOMContentLoaded", function () { const checkButton = document.getElementById("checkButton"); const resultDiv = document.getElementById("result"); checkButton.addEventListener("click", function () { const htmlCode = document.getElementById("htmlInput").value; // Split the HTML code into lines for line number tracking const lines = htmlCode.split('n'); // Regular expression pattern…

VIEW QUESTION
Back To Top
Search