HIDE & SHOW ON CHANGE DROP DOWN

<html>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">

</script>


<script>

$(document).ready(function(){

$('#purpose').on('change', function() {

if ( this.value == '1')

//.....................^.......

{

$("#business").show();

}

else

{

$("#business").hide();

}

});

});

</script>

<body>

<select id='purpose'>

<option value="0">Shiva</option>

<option value="1">sandeep</option>


</select>


<br/>&nbsp;

<input type='text' class='text' id='business' name='business' value size='20' style='display:none;'/>

<br/>

</div>

</body>

</html>

Sign In or Register to comment.