To create the number of inputs based on how many children are selected you could do the following:
$(document).on('pageinit',function(){ // use this instead of dom ready, .on is dependent upon jQuery 1.7 + use bind or delegate if you have older version
$('#children').on('change',function(){ // this function runs each time the select menu is changed
children = $(this).val(); //set variable for number of children
while(i <= children){ //loop through as long as i is less than number of children
$('form').append('<label>Name</label><input type="text" name="child'+i+'Name" /><label>Age</label><input type="text" name="child'+i+'Age" />'); // append the input to form
i++ // add one to our incremnt variable
}
$('.ui-content').append('<input type="submit" value="Submit" />'); // add our submit button on end
$('.ui-page').trigger('create'); // then tell JQM to recreate page because we added new content
});
});
Here is a working example for that -> http://jsfiddle.net/codaniel/CDUth/1/
As for reading the values you can see that i used .val(). That is the easiest way of reading a specific input. Check documentation for more examples-> http://api.jquery.com/val/
You can also serialize the whole form like with serialize(). Read more here -> http://api.jquery.com/serialize/