javascript get value of input by name code example
Example 1: check the doc name in javascript
var path = window.location.pathname;
var page = path.split("/").pop();
console.log( page );
Example 2: how to get input name in javascript
// Using jQuery:
$('#id').attr('name');
// Using vanilla js:
let name=document.getElementById("id").name;