SHARE
TWEET

Untitled

a guest Jun 17th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function addHoliday() {
  2.     var holDate = document.getElementById("holidayDate").value;
  3.     var tbl = document.getElementById('calendar');
  4.     for (var i = 0; i < tbl.rows.length; i++) {
  5.         for (var j = 0; j < tbl.rows[i].cells.length; j++){
  6.             var data = parseInt(tbl.rows[i].cells[j].innerHTML);
  7.             if(data == holDate){
  8.                 tbl.rows[i].cells[j].bgColor = "red";
  9.             }
  10.            
  11.         }
  12.     }
  13. }
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