javascript - Why does the input text fields not appear -
i'm debugging bigger system, have tried take out parts think posing problems.
i can't quite see why input text fields aren't appended html in this jsfiddle.
the js code:
(var counter = 0; counter < 20; counter++) { var anbox = $(document.createelement('input')).attr({ type: 'text', class: 'anbox', size: '1', maxlength: '1' }); anbox.appendto('#answerline_' + i);};
yeah, minor. there no i
variable defined, should counter
instead:
anbox.appendto('#answerline_' + counter);
in order search such problems suggest use debugging tools chorme developer console or firebug.
Comments
Post a Comment