如何更改gwt/gxt项目中的html body标签属性

发布于 2024-12-28 12:57:18 字数 196 浏览 3 评论 0原文

我正在构建一个 gxt 项目。 我想添加来自属性文件的区域设置配置。 例如:

user.direction=rtl

我想更改项目的html文件的body标签,根据这个配置:

<body dir="rtl">

有没有办法做到扔代码?

I'm building a gxt project.
I want to add a configuration of locale that will come from a properties file.
for example:

user.direction=rtl

I want to change the body tag of the html file of the project, according to this configuration:

<body dir="rtl">

is there a way to do it throw the code?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

韵柒 2025-01-04 12:57:18
RootPanel.getBodyElement().setAttribute("dir", "rtl");

我不确定是否适用于旧版本的 GWT 2.4.0。

RootPanel.getBodyElement().setAttribute("dir", "rtl");

Works on GWT 2.4.0 for older version I'm not sure.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文