简体   繁体   English

我如何在此文本中创建超链接

[英]how do i create the hyperlink in this text

I create this code i want to make the text become a hyperlink when i try to test this this code will go to the default page 我创建此代码,当我尝试测试此代码时,我想使文本成为超链接,该代码将转到默认页面

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

The a-tag in the title string looks weirdly formatted, also i don't know there's any particular reason you would split the string into two. 标题字符串中的a-tag格式看起来很奇怪,我也不知道有什么特殊的原因将字符串分成两部分。

Try setting the title like so 尝试像这样设置标题

...
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>'
...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM