JSFiddle - React, Tailwind, and code Playground
by Dave Mednick
HTML
<form method="POST" id="postform"></form>
<form method="post" id="POSTform"></form>
<form method="GET" id="GETform"></form>
<form method="get" id="getform"></form>
JavaScript
$(function () {
$("form").each(function (index) {
var m = $(this).attr('method');
var i = $(this).attr('id');
console.log(index + ": " + m + " = " + i);
if (m + "form" == i) console.log("Attributes match!");
});
});