Search
 
SCRIPT & CODE EXAMPLE
 

HTML

html add input on button click

function add() {
  var new_chq_no = parseInt($('#total_chq').val()) + 1;
  var new_input = "<input type='text' id='new_" + new_chq_no + "'>";
  $('#new_chq').append(new_input);
}

function remove() {
  var last_chq_no = $('#total_chq').val();
  if (last_chq_no > 1) {
    $('#new_' + last_chq_no).append('');
    $('#total_chq').val(last_chq_no - 1);
  }
}
Comment

PREVIOUS NEXT
Code Example
Html :: can se have same id for radio button in html 
Html :: request html nodejs 
Html :: Using new line( ) in string and rendering the same in HTML 
Html :: alpinejs submit prevent default 
Html :: html gif not showing 
Html :: python download html as string 
Html :: semantic ui 
Html :: img tag in htmlto svg graphic 
Html :: html extarea line break 
Html :: iframe syntax 
Html :: render html in react from string 
Html :: free form template html 
Html :: html ecrire en gras 
Html :: alpine function 
Html :: tooltip in html 
Html :: html "/n" not woring 
Html :: vue paragraph not showing when class applied to it 
Html :: how to take an aimage in html and css 
Html :: if the screen size is then link a css file html 
Html :: carousel in bootstrap 
Html :: common web server ports 
Html :: clickable image html 
Html :: bulleted list html 
Html :: ubuntu 22.10 vmware 
Html :: jspdf html to pdf angular 8 
Html :: table label html 
Html :: navbar tailwind 
Html :: html table serial number 
Html :: default value to select simple form for 
Html :: run html 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =