JSFiddle - React, Tailwind, and code Playground
HTML
<form name="form1" method="post" action="">
<input type="text" id="txtTitle" name="txtTitle" mand="Y" value="The Red Album" />
<input type="button" name="saveme" value="Save" onclick="doStuff()"
</form>
JavaScript
//standard DOM functions trying to access custom attribure: 'mand'
//MUST RUN IN ==INTERNET EXPLORER==
function doStuff() {
//get the name attribute - all work
alert(document.getElementById("txtTitle").name);
alert(document.form1.txtTitle.name);
alert(form1.txtTitle.name);
//get the mand attribute - none work
alert(document.getElementById("txtTitle").mand);
alert(document.form1.txtTitle.mand);
alert(form1.txtTitle.mand);
//using DOM collections
alert(document.forms(0).elements(0).id); //works
alert(document.forms(0).elements(0).mand); //doesn't work
}