![]() To change the colors in the code, replace the "green" and "skyblue" colors in the code style.background. If you want to change the colors, you can either use color names like "Green" or "Skyblue," Hexadecimal numbers (which you can find by searching Hexadecimal colors), or RGB colors (which you can also find by a simple internet search).For example, let’s say we want to change the text of the clicked button to Hello. ![]() ![]() What we have to do is use the parameter of the anonymous function and navigate to the target, which is the element on which the action has been executed. If you look at I have put the 0 and 1 into a span and floated them left as well. Using an statement, the button is skyblue until the input field is filled, then it changes to a green button. We can refer to the HTML element from our JavaScript code in a direct way. Because the i's are floating left they are moving the 0 over to the right.Document UserName : Press Me function changeTheColorOfButtonDemo ()
0 Comments
Leave a Reply. |