How can I get name of element with jQuery?

前端 未结 7 904
执笔经年
执笔经年 2021-01-30 07:49

How can I get name property of HTML element with jQuery?

7条回答
  •  借酒劲吻你
    2021-01-30 08:20

    The method .attr() allows getting attribute value of the first element in a jQuery object:

    $('#myelement').attr('name');
    

提交回复
热议问题