首页 > 解决方案 > How to Sense case and writing in HTML input

问题描述

I want to write a question and options in a text box in the format of a Word file, for example, or text. When I save, I want to bring the question to the table of questions and options to its table. How do I read the text document or the text inside the input line with a line of feeling that the line represents a question or options, for example:

*#Question 1
*Options
*Options
*Options*

What is here is how the lines can be listed and their ability to sort by line after line or by word after word.

标签: javascriptc#html

解决方案


我认为您要问的是如何访问 html 中的元素。为此,您需要 DOM。元素是您要获取的文本的 id

var element_text = document.getElementById("element").innerHTML

推荐阅读