I am making a screen that adds images to the database and after doing so, ready them by adding a text box in which I will capture their DESCRIPTION, example:
<form>
<input id="1" name="ftp_desc" maxlength="256" placeholder="Añade una descripción" required="required" type="text">
<input id="2" name="ftp_desc" maxlength="256" placeholder="Añade una descripción" required="required" type="text">
<input id="3" name="ftp_desc" maxlength="256" placeholder="Añade una descripción" required="required" type="text">
</form>
<a type="button" onclick="javascript: agregarPasoDieciseis()">Finalizar</a>
Javascript
function agregarPasoDieciseis() {
var descripcion = document.getElementsByName("ftp_desc").value;
alert(descripcion);
}
As I get the IDs and the VALUE of the input with Javascript, the previous code did not work for me.