开发者

Virtualkeyboard using javascript

开发者 https://www.devze.com 2023-04-05 11:54 出处:网络
I am trying to change the colors of my keybuttons from my javascript code my keys are disp开发者_运维技巧layed within \"td class\" how can I change the color of my keybuttons using javascript code.SCR

I am trying to change the colors of my keybuttons from my javascript code my keys are disp开发者_运维技巧layed within "td class" how can I change the color of my keybuttons using javascript code.


SCRIPT:

var tdKeyButton=document.getElementById('#idOfSomeButton'); // or any other code for getting pointer to `TD` element of virtual key button.
tdKeyButton.className="SomeKeyButtonCssClassName";
// or for multiple CSS classes
// tdKeyButton.className+=" SomeKeyButtonCssClassName";
// or with inline style
// tdKeyButton.style.backgroundColor="#F0000F";

CSS style:

   .SomeKeyButtonCssClassName {
      background-color: #F0000F;
   }

See: CSS background-color https://developer.mozilla.org/en/CSS/background-color

0

精彩评论

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