Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. <select class="form-control" id="p_in_qty" style="width:100px; margin-left:50px;">
  2. <?php
  3. $array = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30);
  4. foreach ($array as $value) {
  5. echo '<option value="'.$value.'">'.$value.'</option>';
  6. }
  7. ?>
  8. </select>
  9.  
  10.  
  11.  
  12.  
  13. <select class="form-control" id="p_av_qty" style="width:100px; margin-left:50px;">
  14. <?php
  15. $array = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30);
  16. foreach ($array as $value) {
  17. echo '<option value="'.$value.'">'.$value.'</option>';
  18. }
  19. ?>
  20. </select>
  21.  
  22.  
  23.  
  24. <button type="button" onClick="check();" class="btn btn-primary btn-md">Check</button>
  25.  
  26. function check(){
  27.  
  28. var i_qty = $('#p_in_qty').val();
  29. var s_qty = $('#p_av_qty').val();
  30.  
  31. if(s_qty > i_qty){
  32.  
  33.  
  34. alert("s_qty is greater than i_qty") ;
  35.  
  36. }else{
  37. alert("fine");
  38. }
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement