gpt4 book ai didi

ExtJs 标签文本更改

转载 作者:行者123 更新时间:2023-12-01 08:39:17 24 4
gpt4 key购买 nike

在 ExtJs 中如何动态更改标签文本
IE
我是这样使用的
LabelError.innerText = "需要新密码。";
LabelError.style.color = "红色";

但它仅在 ie 和 chrome 中有效,而在 Firefox 中无效

那么如何在所有浏览器中动态更改标签文本

最佳答案

正如您在 label class docs 中看到的那样,正确的方法是调用该函数:

LabelError.setText('<span style="color:red">New password is required.</span>', false);
false 参数将防止 html 标签被函数破坏。无论如何,您可以尝试尝试一下。

关于ExtJs 标签文本更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5909702/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com