This article describes the JS implementation method to allow visitors to self-select web text colors. Share it for your reference. The specific implementation method is as follows:
<html><head><title>JS implementation allows visitors to self-select the text color of the web page</title><script language="javascript"><!-- function chColor(c){ document.body.style.color = c; }//--></script></head><body><input name="c" type="radio" value="#000000" onClick="chColor(this.value)" checked>Black<input name="c" type="radio" value="#0000FF" onClick="chColor(this.value)">Blue<input name="c" type="radio" value="#FF0000" onClick="chColor(this.value)">Red<br>The text in this line will change the color! </body></html>I hope this article will be helpful to everyone's JavaScript programming.