0

我创建此代码我想让文本成为超链接,当我尝试测试此代码时,此代码将转到默认页面

$("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 : ""
});
4

1 回答 1

0

标题字符串中的 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-07-12T07:00:01.187 回答