JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<input type="text" class="form-control" name = "nameInformation[]" id="prizName" placeholder="Приз">
</div>
<div class="information_json_plus">
<div>
<span style="float: right; margin-top: 10px;" class="btn btn-success plus pull-right">+</span>
</div>
</div>
<input id="but1" style="margin-top: 10px;" class="btn btn-success" type="button" value="Запросить файл" />
CSS
/* общий стиль */
input[type="checkbox"]{zoom:1.5; }
.hr{border-bottom: 1px solid #000}
.block{ width: 530px; padding: 10px; border: 1px solid #000;float: right; }
.information_json * {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* стиль динамических полей*/
.pull-right {float: left;}
.form-control {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
color: #555;
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
-webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
}
.btn {
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: 400;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
}
.btn-danger {
color: #fff;
background-color: #d9534f;
border-color: #d43f3a;
}
.btn-success {
color: #fff;
background-color: #5cb85c;
border-color: #4cae4c;
}
.titleLebel{
line-height: 30px;
padding-left: 20px;
}
span.time{
...
JavaScript
// формируем новые поля
jQuery('.plus').click(function(){
jQuery('.information_json_plus').before(
'<div><input style="width: 490px; float: left; margin-top: 5px;" type="text" class="form-control" name = "nameInformation[]" id="prizName" placeholder="Приз">' +
'<span class="btn btn-danger minus pull-right" style="float: right; margin-top: 5px;">–</span></div>'
);
});
// on - так как элемент динамически создан и обычный обработчик с ним не работает
jQuery(document).on('click', '.minus', function(){
jQuery( this ).closest( 'div' ).remove(); // удаление строки с полями
});
$(document).ready(function(){
$("#but1").click(function(){
var arr=[
['первое значение'],
['второе значение'],
['третье значение']
];
alert(arr);
})
});