Cambiar el valor de un input con jQuery

Suponiendo que tenemos el siguiente input en nuestro html

<input id="idElemento" type="text" value="valor1" >
 


Si queremos cambiar el valor del input utilizamos el siguiente código jQuery

  $("#idElemento").val("valor2");
 




Share This Post →

No hay comentarios:

Publicar un comentario

Powered By Blogger |   Designed By Blogger Templates
DMCA.com