JSFiddle - React, Tailwind, and code Playground

by Walter Rumsby

HTML

<input type="text" id="foo" maxlength="10">

JavaScript

var el = document.getElementById('foo'),
    attrs = el.attributes,
    length = attrs['maxlength'].value;

alert(length);