php - How to generate number with textbox by javascript? -
i have 1 textbox called main_textbox when user enter number call javascript
function on onblur event of textbox , code
function generate_bale(){ var bale=document.getelementbyid("number_of_bale").value; var boxes = "<p>"; (var i=0;i<`bale`;i++){ boxes+="<input type='text' name='bale_numbers[]'><br><br>"; } document.getelementbyid("bale_box").innerhtml = boxes; }
i genereate number of textbox enter in main_textbox suppose if want generate number 1.textbox 2.textbox 3.textbox how print number in front textbox can identify generated textbox number of textbox is
thanx in advance
for (var i=0;i<bale;i++){ boxes+= + ". <input type='text' name='bale_numbers[]'><br><br>"; } document.getelementbyid("bale_box").innerhtml = boxes; }
Comments
Post a Comment