Advertisement
Guest User

coding new field

a guest
May 30th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <label>No Matrik Peserta </label>
  2. <input type="text" name="NoMatrik_Staf" id="NoMatrik_Staf" />
  3. <input type="button" onclick="addInput()" name="NoMatrik_Staf" id="NoMatrik_Staf" value="+ Pelajar"/><br/>
  4.  
  5. //coding for add new text field
  6. <span id="responce"></span>
  7. <script>
  8. var countBox =1;
  9. var boxName = 0;
  10. function addInput()
  11. {
  12. var boxName="textBox"+countBox;
  13. document.getElementById('responce').innerHTML+='<br/><input type="text" id="NoMatrik_Staf" value="" " /><br/>';
  14. countBox += 1;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement