Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
147
rated 0 times [  148] [ 1]  / answers: 1 / hits: 89088  / 15 Years ago, mon, july 27, 2009, 12:00:00

Suppose I have the following line of code in html, how to set the text color and size inside MonitorInformation DIV element in a programming way using Javascript in an easy way? Sorry for my stupid, I figured a long time but cannot figure out. :-(



<div id=MonitorInformation>Connecting...wait</div>


thanks in advance,
George


More From » html

 Answers
15
var elem = document.getElementById(MonitorInformation);
elem.innerHTML = Setting different HTML content;
elem.style.color = Red;
elem.style.fontSize = large;

[#99048] Wednesday, July 22, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
clarkulisesa

Total Points: 422
Total Questions: 93
Total Answers: 112

Location: Austria
Member since Thu, Jan 7, 2021
3 Years ago
clarkulisesa questions
Mon, Feb 24, 20, 00:00, 4 Years ago
Mon, Aug 12, 19, 00:00, 5 Years ago
;