Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function zmienKolor() {
- var priceLimit = parseInt(document.getElementById("check1").value);
- changeBoxColorAccordingToPrice(priceLimit, 1, "box1");
- changeBoxColorAccordingToPrice(priceLimit, 3, "box2");
- // ...
- }
- function changeBoxColorAccordingToPrice(priceLimit, priceElementIndex, boxId) {
- var price = document.getElementsByTagName("h3")[priceElementIndex].innerHTML;
- // ....
- if (priceLimit >= price) {
- document.getElementById(boxId) = // ...
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement