Variable numbers of inputs can be tricky when creating a web form. We have all come across those web forms that have a static number of multiple blanks all set to take variable amounts of the same type of information. For instance, what if our form is to collect employment information; the arbitrary number of 5 blanks might be too many for some and still not enough for most. Creating that form with a variable number of blanks would solve that issue.
Knowing which information we need to collect will really speed up our development. We can write down on a sheet of paper the fields we will need to collect, group them intelligently, and then lay them out in our HTML in an eye-appealing fashion before beginning our JavaScript.
Before beginning the scripting, create a FORM that can be used in our recipe.
<form action="javascript:" method="get" id="my_form"> <div id="my_parent"> <div id="automobile1" style="background...