【发布时间】:2019-11-30 05:21:05
【问题描述】:
我正在尝试制作行号生成器工具。当任何人在 Textarea 中写入一些行并单击“添加行号”按钮时,所有行都会获得序列号。我不知道该怎么做,只是分享结构代码。请帮忙,在此先感谢。
<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>
【问题讨论】:
-
我正在尝试制作行号生成工具....代码在哪里?
-
您的输入和预期输出是什么?
-
@SBimochan 输入:AppleBannana 那么输出应该是 1)Apple2)Banana
标签: javascript html css