Am I allowed to add whatever attributes I want to HTML tags such that I can retrieve their value later on using javascript? For example:
<a href="something.html" hastooltip="yes" tipcolour="yellow">...</a>
If that's not going to work, how would you store arbitrary pieces of information like this?
Edit: Since it appears that making up HTML attributes isn't technically valid, I've rephrased the second part of this question into its own question here: How to store arbitrary data for some HTML tags
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…