I am trying to make the line number generator tool. When anyone writes some lines in the Textarea and click on "Add Line Number" button, then all lines get sequence number. I have no idea how to do this, just sharing the structure code. Please help, thanks in Advance.
<html>
<body>
<form>
<textarea autocomplete="off" cols="30" id="TextInput" name="message" rows="25" style="display: block;margin-left: auto;margin-right: auto;width: 70%;"></textarea>
<br />
</form>
<input id="AddLineNumber" onclick="myFunction()" style="display: block;margin-left: auto;margin-right: auto;color: black;" type="button" value="Add Line Number!" /><br />
<script>
function myFunction() {
}
</script>
</body>
</html>