JSFiddle - React, Tailwind, and code Playground

by vikrant singh

HTML

<ul class="nav nav-tabs">
    <li class="one">One Code</li>
    <li class="two">Two Code</li>
    <li class="three">Three Code</li>
</ul>
<button type="submit" id="btnid" onclick="btnclick();">Submit</button>

JavaScript

function btnclick() {
    var arr = [];
    $("ul.nav").find("li").each(function () {
        arr.push($(this).html()) //I don't know what you want, I am assuming the Html
    })
    alert(arr);
}