ASP文本框中的Span标签在Firefox中不起作用 [英] Span tag inside the asp text box is not working in Firefox

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

问题描述

大家好,


我可以使用jquery在asp文本框控件内生成一些标签. 以下是jquery

var bb = document.createElement(''span'');
bb.innerHTML ="test123";
$(#" +<%= TextBox1.ClientID%>").append(bb);

我可以在IE中看到文本"test123",但在Firefox(我正在使用5)中看到一个空白文本框.

当我在萤火虫中看到时,该跨度在文本框内创建.

我之所以需要这样做,是因为我只需要在文本框中设置一些文本的格式.

谁能告诉我如何使跨度内容也显示在FF中?

Hi all,


I am able to generate some tags inside the asp textbox control using jquery
Following is the jquery

var bb = document.createElement(''span'');
bb.innerHTML= "test123";
$("#" + "<%= TextBox1.ClientID %>").append(bb);

I can see the text "test123" in IE but a blank textbox in Firefox(I am using 5).

When I see in firebug, that span got create inside the textbox.

The reason why I need this is I need to format only some text inside the textbox.

Can anyone tell me how to make that span content to be displayed/get shown in FF too?

推荐答案

(#" +<%= TextBox1.ClientID %>).append(bb);

我可以在IE中看到文本"test123",但在Firefox(我正在使用5)中看到一个空白文本框.

当我在萤火虫中看到时,该跨度在文本框内创建.

我之所以需要这样做,是因为我只需要在文本框中设置一些文本的格式.

谁能告诉我如何使跨度内容在FF中显示/显示吗?
("#" + "<%= TextBox1.ClientID %>").append(bb);

I can see the text "test123" in IE but a blank textbox in Firefox(I am using 5).

When I see in firebug, that span got create inside the textbox.

The reason why I need this is I need to format only some text inside the textbox.

Can anyone tell me how to make that span content to be displayed/get shown in FF too?


这篇关于ASP文本框中的Span标签在Firefox中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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