jquery get a custom (made up) Attribute value

前端 未结 3 1137
终归单人心
终归单人心 2021-01-13 12:08

I have a the following html piece :

&l
3条回答
  •  死守一世寂寞
    2021-01-13 12:43

    This works perfectly:

    getComments = function(input) {
      fValue =  $(input).attr("store-id");
      alert('the ID :'+fValue);
    }
    

    http://jsfiddle.net/mHBuE/

提交回复
热议问题