开发者

Span tag inside the asp text box is not working in Firefox

开发者 https://www.devze.com 2023-03-23 02:53 出处:网络
I am able to generate sometags inside the asp textbox control using jquery Following is the jquery var bb = document.createElement(\'span\');

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

Following is the jquery

var bb = document.createElement('span');
  开发者_StackOverflow中文版 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.

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


I had encountered this problem before ::

Essentially .append operation is adding the span into . Changes to this are not always reflected in Chrome/Firefox .

Instead try adding it by using

TextBox.value += "Testing content addition";
0

精彩评论

暂无评论...
验证码 换一张
取 消