Html/[removed] Add Attribute to an HTML Control

前端 未结 5 627
悲哀的现实
悲哀的现实 2021-01-15 00:49

Need: Find a way to add a valid tag/attribute/property to a normal html control.

What I have is some javascript/jquery adding a click event to a link that will show

5条回答
  •  生来不讨喜
    2021-01-15 01:37

    If you're using JQuery, just get and set the attributes with .attr().

    Get: this.attr("textToShow")

    Set: this.attr("textToShow", value)

提交回复
热议问题