can anyone give tips or ideas on how to write a script to select a color on a live page so that the selected color is applicable to the whole .thanks page in advance.
Basically, as Darren says, you should change the color bodyusing the jQuery selector. Here you can find a simple user interface such as jQuery ColorPicker .
body
- Javascript, jquery. jQuery, html . , div, :
$("div").css("background-color", "blue");
$ DOM ( html, ), css - css.
Online demo: http://jsbin.com/ezeze
document.getElementById("colors").onchange = function(){ document.getElementById("container").style.color = this.value; }
-
<select name='colors' id='colors'> <option>red</option> <option>green</option> <option>blue</option> </select> <div id="container"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> <p>Curabitur dolor metus, aliquam in convallis ut, pharetra ac enim.</p> <p>Ut lobortis justo in dolor rutrum vulputate.</p> </div>
Source: https://habr.com/ru/post/1728881/More articles:usability of synchronized ... methods in java.util.Collections - javaΠ£ΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ ΠΏΡΠΎΡΠ΅ΡΡΠ°ΠΌΠΈ Windows Ρ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ΠΌ Python - pythonHow to run arbitrary SQLite query from Visual Studio? - sqliteThin Oracle driver and transparent rejection of RAC DB - javaHow to debug when porting from Java 1.5 to 1.6? - javaHow to upload a file to asp.net without reloading the page - fileΠΠ΄Π΅ (Π² ΠΊΠ°ΠΊΠΎΠΉ ΠΌΠΎΠΌΠ΅Π½Ρ ΠΊΠΎΠ΄Π°) ΠΊΠ»ΠΈΠ΅Π½Ρ pyAMF ΠΏΡΠΈΠ½ΠΈΠΌΠ°Π΅Ρ ΡΠ΅ΡΡΠΈΡΠΈΠΊΠ°Ρ SSL? - pythonjQuery: ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΡ ΠΎΠ΄ΠΈΠ½ Π²ΡΠ·ΠΎΠ² Ajax, ΠΏΠΎΠ»ΡΡΠ°ΡΡ ΠΏΡΠΎΠ³ΡΠ΅ΡΡΠΈΠ²Π½ΡΠ΅ ΡΡΠ°ΡΡΡΡ Π²ΠΌΠ΅ΡΡΠΎ ΠΎΠ΄Π½ΠΎΠ³ΠΎ ΠΎΡΠ²Π΅ΡΠ°? - javascriptProblems unpacking a domain Weblogic 10.3 - javaWhat is the difference between these codes and what does the representation do? - pythonAll Articles