在Jquery Ui对话框中使用Html标签 [英] Using Html Tag in Jquery Ui Dialog

查看:84
本文介绍了在Jquery Ui对话框中使用Html标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Jquery Ui对话框,并有问题设置文本。我使用这段代码插入链接:

I'm Using Jquery Ui Dialog and have problem setting text. I'm using this code to insert a link:

$('#dialog').text(<a href=\"#\" >Click Here</a>).dialog();

但它显示代码和标签而不是链接。如何使用标签?

But it shows the code and tags instead of the link. How can I use tags there?

推荐答案

当您使用文本时,您完全告诉jquery ui核心将该字符串视为文本。
您可以简单地使用这样的HTML:

when you use text , you exactly tell the jquery ui core to treat that string as a text. You can simply use HTML like this :

$('#dialog').html('<a href="#" >Click Here</a>').dialog();

这篇关于在Jquery Ui对话框中使用Html标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆