<div>
<div id="input-1"><input type="text" value="Add Url"></div>
<br>
<button type="submit" id="send_ur_from_redis" > Send</button>
<button type="submit" id="send_ur_from_redis" onclick="DeleteInput()" > Remove Input</button>
<button type="submit" id="create_input_button" onclick="CreateInput()">Create Input</button>
</div>
</body>
<script>
var id_arr_input = ['input-1']
function CreateInput() {
var element_input_last = document.getElementById('input-1');
var new_input = document.createElement("input");
new_input.setAttribute('id', 'input-'+ (id_arr_input.length + 1).toString())
id_arr_input.push('input-'+ (id_arr_input.length + 1).toString())
new_input.setAttribute('name','delete')
new_input.setAttribute("type", "text");
new_input.setAttribute("value", "Add URL");
new_input.style.cssText = "margin-left:1%;";
element_input_last.appendChild(new_input);
if (id_arr_input.length >= 6) {
document.getElementById('create_input_button').style.visibility = 'hidden';
}
}