【发布时间】:2013-10-21 02:56:52
【问题描述】:
在使用 JavaScript innerhtml,甚至 jQuery html 或 append 时,我很难让链接变得可点击。
我尝试关注此jquery .html() VS innerHTML() 并提出了一些问题,但似乎所有建议都没有奏效。
我怎样才能使用这个链接?
innerHTML("<a href='http://www.google.com'>google.com</a>");
和点击
innerHTML("<a href='#' onclick='loadlink('http://www.google.com');'>google.com</a>");
我尝试过两种方法,但都不起作用。
【问题讨论】:
-
@RusellHarrower 请将其作为答案发布,以便大家理解。
标签: javascript jquery ios hyperlink