How to get the text information of the current element in vue.js
This article introduces the knowledge of "how to get the text information of the current elements in vue.js". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Get the content of the current click
1. On the use of official account
When I click on the li tag, I want to get the text in the span. I can use this method:
Problem1: function (e) {console.log (e.target.innerText);}
It's ok like this.
2. Chinese judgment
Note: the character set must be correct, such as utf-8 or gbk. Or the judgment will be wrong.
This is the end of the content of how to get the text information of the current element in vue.js. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!