1. ホーム
  2. jquery

[解決済み] Get attribute name value of <input>

2022-05-05 14:39:41

Question

How to get the attribute name value of a input tag using jQuery. Please help.

<input name="xxxxx" value="1">

How to solved?

Give your input an ID and use the attr method:

var name = $("#id").attr("name");