What is the JavaScript code snippet to change the class and let the stylesheet specify the details?

What is the JavaScript code snippet to change the class and let the stylesheet specify the details?
A. timestamp.className = “highlight”;
B. timestamp.className = “change”;
C. timestamp.className = “specify”;
D. timestamp.className = “move”;
 
Answer: a
Explanation: Each Element object has style and className properties that allow scripts to specify CSS styles for a document element or to alter the CSS class names that apply to the element. The above code snippet changes the class and lets the stylesheet specify the details.
 

Tìm kiếm

Back
Top