Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $(document).ready(disablecity);
- function disablecity(){
- disable();
- $('#country').change(disable);
- function disable()
- {
- value=$('#country :selected').text();
- if(value!=='Pakistan')
- {
- $('#city').attr('disabled','disabled');
- }
- if(value=='Pakistan')
- {
- $('#city').removeAttr('disabled','disabled');
- }
- }
- }
- </script>
Add Comment
Please, Sign In to add comment