开发者

ExtJs label text change

开发者 https://www.devze.com 2023-03-03 15:20 出处:网络
In ExtJs how to change label text dynamically i.e iam using like this L开发者_开发问答abelError.innerText = \"New password is required.\";

In ExtJs how to change label text dynamically i.e iam using like this L开发者_开发问答abelError.innerText = "New password is required."; LabelError.style.color = "red";

but its work only in ie and chrome but not in firefox

so how to change label text dynamically in all browsers


As you can see in the label class docs, the right way to do it is to call the function:

LabelError.setText('<span style="color:red">New password is required.</span>', false);

The false argument will prevent the html tags from being mangled by the function. Anyway, you can try to experiment with it.

0

精彩评论

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