I'm using Webform. How can I use JavaScript in it? I am using webform. I'm going to create to fields. First one should be taxonomy term name, and second one should be taxonomy term values. In this case I'm trying to use javascript. When you choose a category in first field, it should be seen categories acording first one. For example: when you choose "animals" category in first field, it should be seen "bear", "lion", "sparrow" and other categories in second. When you choose "fruits" category in first field it should be seen "apple", "bananas", "ananas" and other categories in second. How to solve this problem?
You should try Webform conditional module.


  This modules enhances the existing Conditional Rules of the Webform
  Module. It adds the ability to make components dependent on select
  components(i.e. listboxes, radio buttons, and checkboxes) that appear
  on the same page.


Screencast Demo

View a demonstration form