Setting a boolean attribute with jquery

后端 未结 3 1180
离开以前
离开以前 2021-01-17 10:40

I understand that jquery will allow you to modify attributes with the .attr() method. There are basically two methods:

$(\'#element\').attr(\'attribute\', \'         


        
3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-17 11:35

    HTML attributes are always string values. If you indeed want to set something other than a string, then please consider using jQuery.data()

提交回复
热议问题