javascript - hide textfields instantly when check a radio button -


what want when user chooses first option textfield disappear , when users chooses second textfield appear again instantly. here's code:

<input type="radio" name="radiogroup0" value="1" id="student"  /> <input type="radio" name="radiogroup0" value="0" id="not student"  /> 

and want hide/show this:

<label for="department">department:</label> <input name="department" type="text" class="label" value=""  /> 

i have tried i'll appreciate answer

on click, keyup, , change events, show or hide appropriate elements (jquery makes easier). reason handling events value change may triggered after element loses focus.

happy coding.


Comments

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -