问题
I have a css file that I want to add to an option for links, to make them grab and show the first h1 tag from the linked page, and display it when the mouse is hovered over the link (as a title, or alt text). (or how to do it with a central javascript file?
Example: http://en.wikipedia.org/wiki/Main_Page any link in that page, shows the title of the linked page.
回答1:
Unless I'm missing something to your question, you're just talking about the regular HTML Title attribute. At least, on your example page, that's all that is happening - the links have titles.
来源:https://stackoverflow.com/questions/12623157/in-css-js-make-links-on-mouse-over-hover-shows-what-is-in-h1