There are tags:
<input type="text" name="profession" placeholder="Ответ" class="qn_1"> How to find out by means of js, which tag of the qn_1 class?
...">
There are tags:
<input type="text" name="profession" placeholder="Ответ" class="qn_1"> How to find out by means of js, which tag of the qn_1 class?
$("output").text(Array.prototype.map.call($(".qn_1"), function (el) { return el.tagName.toLowerCase(); }).join("\n")); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <input type="hidden" name="profession" placeholder="Ответ" class="qn_1"> <div class="qn_1"></div> <pre><output></output></pre> map - Grundyjoin ... - Qwertiy ♦toArray that will return an array that has :-) and in the extreme case, you can also join via call — Grundy console.log(document.querySelector('.qn_1').tagName); <input type="text" name="profession" placeholder="Ответ" class="qn_1"> Source: https://ru.stackoverflow.com/questions/514596/
All Articles