Javascript examples for DOM HTML Element:Cite
The Cite object represents an HTML <cite> element.
You can access a <cite> element by using getElementById():
<!DOCTYPE html> <html> <body> <p><cite id="myCite">CSS</cite> this is a test</p> <button onclick="myFunction()">set the color of the citation to red</button> <script> function myFunction() {//from www.java2s . c o m var x = document.getElementById("myCite"); x.style.color = "red"; } </script> </body> </html>