SHARE
TWEET

zmienKolor()

a guest Dec 3rd, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function zmienKolor() {
  2.     var priceLimit = parseInt(document.getElementById("check1").value);
  3.     changeBoxColorAccordingToPrice(priceLimit, 1, "box1");
  4.     changeBoxColorAccordingToPrice(priceLimit, 3, "box2");
  5.     // ...
  6. }
  7.  
  8. function changeBoxColorAccordingToPrice(priceLimit, priceElementIndex, boxId) {
  9.     var price = document.getElementsByTagName("h3")[priceElementIndex].innerHTML;
  10.     // ....
  11.     if (priceLimit >= price) {
  12.         document.getElementById(boxId) = // ...
  13.     }
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top