Home > Article > Web Front-end > JavaScript creates new tags, determines keyboard input, and determines focus (sample code)_javascript skills
As shown below:
var order_no=0;
var gg=document.getElementsByName("order_no[]");
var hh=0;
for(var hh=0;hh
order_no=gg[hh].value;
}
var k=document.createElement('input');
k.type='hidden';
k.name='order_no';
k.id='order_no';
k.value=order_no;
f.appendChild(k);
f.submit();//表单提交
}
}
}
}
//开始监控键盘输入