Guest User

Untitled

a guest
Apr 23rd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. The syntax in your "showHide" function makes no sense. You cannot compare properties using the assignment (=) operator. And there is no validity in assigning the value of one property to an unrelated one in an if statement. A more reasonable approach would be:
  2.  
  3. function showHide (chkID, divID)
  4. {
  5. var x=document.getElementById(divID);
  6. if (document.getElementById(chkID).checked)
  7. x.style.display='block';
  8. else
  9. x.style.display='none';
  10. }
Add Comment
Please, Sign In to add comment