1, make a small icon in the interface through the button can be changed to small change the color change round
<! DOCTYPE html>. box{//set the properties of the displayed boxwidth:100px; height:100px; Background-color:red; } button{//set the properties of your buttonwidth:20px; height:20px; Font-size:5px; /*Background-color:green;*/ } </style>window.onload=function(){ function$ (ID) {//encapsulates the Get ID into a function returndocument.getElementById (ID); } $(' Big '). onclick =function(){//The button with the big ID to operate the box$ (' Hezi '). Style.width = ' 300px '; $(' Hezi '). Style.height = ' 400px '; } $(' small '). onclick =function(){ $(' Hezi '). Style.width = ' 50px '; $(' Hezi '). Style.height = ' 50px '; } $(' ChangeColor '). onclick =function(){ //$ (' Hezi '). Style.color = ' yellow '; The wrong kind of writing you defined above is background this should be background .$ (' Hezi '). Style.backgroundcolor = ' Yellow '; } $(' Circle '). onclick =function(){ $(' Hezi '). Style.borderradius = ' 50% ';//turns round is set into 50% } }</script></body>Change the box size color in an interface2. When your mouse moves to an image, it will be replaced by another one. When moved, it becomes another.
<! DOCTYPE html>window.onload=function(){ varoimg = document.getElementById (' CA '); Oimg.onmouseover=function() {oimg.src= './2_02.png '; varMyDate =NewDate (); //Console.log (mydate.tolocalestring ()); //oimg.title = mydate.tolocalestring ();Console.log (mydate.tolocalestring ()); Oimg.title=mydate.tolocalestring (); } oimg.onmouseout=function() {oimg.src= './2_01.png '; } } </script></body>Transform PictureJavaScript little practiced hand