【问题标题】:how do i create the hyperlink in this text如何在此文本中创建超链接
【发布时间】:2013-07-10 15:38:46
【问题描述】:

我创建了这段代码 我想让文本变成超链接 当我尝试测试这个时 此代码将转到默认页面

$("body").data("q1", {
    id: "q1",
    title: "Is the interest attributable to a business carried on in Malaysia by the " +  '<a href :\"http://prod.resource.wkasiapacific.com/resource/scion/document/default/wmwttcomm1Uio1659397sl244904519?cfu=default\"> non-resident?</a>',
    next: "q2",
    back: "intro",
    yes: "c1",
    no: "q2",
    answer : ""
});

【问题讨论】:

  • 你的问题是什么?

标签: javascript jquery html text hyperlink


【解决方案1】:

标题字符串中的 a-tag 格式看起来很奇怪,我也不知道有什么特殊原因将字符串分成两部分。

尝试像这样设置标题

...
title: 'Is the interest attributable to a business carried on in Malaysia by the  <a href=\"http://prod.resource.wkasiapacific.com/resource/scion/document/default/wmwttcomm1Uio1659397sl244904519?cfu=default\"> non-resident?</a>'
...

【讨论】:

    猜你喜欢
    • 2013-12-10
    • 2016-07-08
    • 1970-01-01
    • 2016-07-17
    • 2021-06-26
    • 2014-04-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多