0

我有 HTML 锚元素:<a title="Tooltip">Text</a>. 然后我将鼠标悬停在锚点上并出现工具提示。然后我运行一些 JavaScript 来通过element.title = "Another Tooltip". 此时工具提示不会被视觉改变,我需要将鼠标移开并移回才能看到新的工具提示。是否可以在不移动鼠标的情况下立即更改工具提示?

4

1 回答 1

1

Maybe you should not use the title attribute, but some JavaScript tooltip library, for example tipsy. This way, you have full control over the behaviour.

于 2012-09-20T12:30:05.340 回答