Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您的问题是在 infobubble 创建和呈现之前,infobubble 中的 HTML“字符串”不是 DOM 的一部分。
这应该有效:
function testClick() { alert("clicked!"); }
并在您的信息窗口/信息气泡中:
var content = '<a id="test" href="javascript:testClick();">Deatils Information</a>';