dynamic step registration js code example
Example 1: javascript steps
var tableEl = document.getElementById("table");
var headerArr=['from','to','capacity','reserve','lefted'];
function header(){
var trEl = document.createElement('tr');
tableEl.appendChild(trEl);
for(var i=0 ; i < headerArr.length ; i++ ){
var thEl = document.createElement('th');
trEl.appendChild(thEl);
thEl.textContent = `${headerArr[i]}`;
}
}
header();
Example 2: javascript steps
var formEl = document.getElementById("form");
var allData=[];