我想访问用户使用JavaScript代码创建的输入块

时间:2019-03-21 11:57:15

标签: javascript

<script type="text/javascript">
    function add(element){
 var form = window.document.dynamicForm;
 // We clone the add button
 var add = element.cloneNode(true);
 // Create a new HTML tag of type "input"'

   my_form=document.createElement('FORM');
   my_form.name='myForm';


//var field = document.createElement("input");

 // The value filled in the form will be stored in an array
// field.name = "champs[]";
// field.placeholder = "champs[input]";
// field.type = "text";
//MAIN DOCUMENTATION

my_tb=document.createElement('INPUT');
my_tb.type='TEXT';
my_tb.name='myInput';
my_tb.placeholder='Values of my Input';
my_form.appendChild(my_tb);

my_tb1=document.createElement('INPUT');
my_tb1.type='text';
my_tb1.name='myInput1';
my_tb1.placeholder='Values of my hidden1';
my_form.appendChild(my_tb1);

my_tb2=document.createElement('INPUT');
my_tb2.type='text';
my_tb2.name='myInput2';
my_tb2.placeholder='Values of my hidden1';
my_form.appendChild(my_tb2); 

document.body.appendChild(my_form);

 var rem = document.createElement("input");
 rem.value = "Remove a field";
 rem.type = "button";
 // Add the onclick event
 rem.onclick = function onclick(event)
  {del(this);};

 // We create a new element of type "p" and we insert the field inside.
 var bloc = document.createElement("p");
 bloc.appendChild(field);
 //form.insertBefore(add, element);
 //form.insertBefore(rem, element);
 form.insertBefore(bloc, element);}

先生,谢谢。先生,我想在每个输入块中访问用户提供的输入。如果用户增加输入块的数量,我可以在新块中获取输入文本并将其发送给我的php文件将数据存储到数据库中。 请帮助我通过单击添加列来按用户访问新的和创建的输入块

1 个答案:

答案 0 :(得分:0)

ffmpeg -i "input.mp4" -profile:v baseline -level 3.0 -start_number 0 -hls_time 10 -hls_playlist_type vod -f hls "input\index.m3u8"

推荐get all the elements of a particular form