JQGRID - 是否可以在JavaScript中更改HTML标题文本的背景颜色? [英] JQGRID - Is it possible to change the background color of HTML header text in JavaScript?

查看:238
本文介绍了JQGRID - 是否可以在JavaScript中更改HTML标题文本的背景颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在JavaScript中更改HTML标题文本的背景颜色?

Is it possible to change the background color of HTML header text in JavaScript?

编辑:oops - 我忘了添加它是jqGrid的标题文本。 。
对不起。

Edited: oops - i did forget to add that is it header text in jqGrid.. i'm sorry about that..

推荐答案

感谢大家!
答案可帮助我找到答案。

thanks for you all!! the answers helps me to find the answer.

var HeaderFontColor = "yellow";
var HeaderBackgroundColor = "brown";
$(".ui-jqgrid-sortable").each(function() {
    this.style.color = HeaderFontColor;
    this.style.backgroundColor = HeaderBackgroundColor;
});

这篇关于JQGRID - 是否可以在JavaScript中更改HTML标题文本的背景颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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