How to get the value of an HTML element by the attribute name instead of the attribute id using JQuery

No Comments

This can be accomplished by using the name attribute selector

$("input[name=ElementName]").val();

ElementName is the attribute name of the element

<input type="text" name="ElementName" />

Image Credits: Photo by Isis França on Unsplash.

Last Updated On March 21, 2018

Related Articles

No results found

Leave a Reply

avatar
  Subscribe  
Notify of
Menu
Copy link