So I have everything working now on my form and ready to go except the insertbefore. I have looked at a bunch of tutorials and everytime I try something it doesnt work?
Could I please see an example using my code?
Could I please see an example using my code?
Code:
function add_student(){
//// Create Line breaks ////
var linebreak=document.createElement("p");
var linebreak0=document.createElement("p");
//// Create text ////
var header = document.createTextNode("Student Information");
var firstname_text = document.createTextNode("First Name: ");
//// Create input boxes ////
var StudentFirstname=document.createElement('input') ;
StudentFirstname.type='text';
StudentFirstname.size='45';
StudentFirstname.name='Student2_Firstname';
//// Append ////
document.forms.Registration.appendChild(header);
document.forms.Registration.appendChild(linebreak0 );
document.forms.Registration.appendChild(firstname_text);
document.forms.Registration.appendChild(StudentFirstname);
}
Comment