Storing arbitrary info in HTML tags for JavaScript?

后端 未结 5 1122
孤独总比滥情好
孤独总比滥情好 2020-11-29 12:48

A very general question.

I am dynamically generating a form that is split into multiple levels of tabs using HTML / JavaScript.

I want to highlight some of t

5条回答
  •  情歌与酒
    2020-11-29 13:33

    In jQuery you have the Data API for the matter. http://docs.jquery.com/Internals/jQuery.data

    If you do not use jQuery, you can add your own tags and store anything in it. everybody will tell you this is not nice etc, but all the great web firms are doing so. so you will end up in a great company ;-)

提交回复
热议问题