jQuery onClick capture the id of the element

后端 未结 6 1077
借酒劲吻你
借酒劲吻你 2020-12-29 20:26

i have many input fields like this

 

when i click this rad

6条回答
  •  渐次进展
    2020-12-29 20:59

    HTML:

     
    

    JS:

    function enableTxt(elem) {
        var id = $(elem).attr("id");
        alert(id);
    }
    

提交回复
热议问题