JSFiddle - React, Tailwind, and code Playground

HTML

<form action="index.php?option=someoption&task=sometask" onsubmit="ajaxLogin(this); return false;" name="someName"> 
    <input type="text"/>
    <input type="submit"/>
</form>

JavaScript

function ajaxLogin(form){
    alert(jQuery(form).attr('name')); //alerts someName 
    alert(jQuery(form).attr('action')); //alerts undefined.
}