As follows, there is an input element on a web page.
<input type = "text" class="text-input">
When I click it, the Javascript code will append another class attribute value W_input_focussuch as:
<input type = "text" class="text-input W_input_focus">
Well, how can I get the class attribute value except the value appended by the Javascript when I click on the input? I use getAttribute('class') method to retrieve ,but it return all the values include the js appended.
It is an example, actually beforehand I do not know which value is set to class attribute in the html code and which value is appended by js. And How can I distinguish , Thanks!
I have found a simple answer:
$(input).trigger("blur").attr("class")