JSFiddle - React, Tailwind, and code Playground

by nosfan1019

HTML

<input type='text' class='main'>
<a href="#">submit</a>

<div>
    <input type='text'>
    <input type='text'>
    <input type='text'>
    <input type='text'>
    <input type='text'>
</div>

CSS

.main {
    margin: 0 0 40px;
}

div input {
    width: 30px;
}

JavaScript

$('a').click(function() {

    function(x) {
        for (var i = 0, len = this.length; i < len; i += n) {
            ret.push(this.substr(i, n))
        }
    }

    var _val = $('.main').val();
    var _str = _val.substr('1');

    console.log(_str);


});