Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <html>
  2. <head>
  3. <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
  4. </head>
  5. <select>
  6. <option value="1">One</option>
  7. <option value="2">Two</option>
  8. </select>
  9. <input type="text" name="bal" id="textbal" onchange="Change()"/>
  10. <script type="text/javascript">
  11. $('select').on('change', function() {
  12. $('#textbal').val( this.value );
  13. debugger;
  14. var a = this.value;
  15.  
  16. alert(a);
  17.  
  18. $('#textball').attr('value',a);
  19. $('#textbal').trigger('change');
  20. });
  21.  
  22. function Change()
  23. {
  24. alert('Hii');
  25. }
  26. </script>
  27. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement