Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/08/2013, 14:54
SeRgIeTTe
 
Fecha de Ingreso: agosto-2011
Mensajes: 45
Antigüedad: 13 años, 2 meses
Puntos: 0
Respuesta: Contenteditable en tabla html y guardado

Lo guardo en localhost, en la "memoria" del navegador.

Código HTML:
<button id="save">Guardar cambios</button>
<script>
	var theContent = $('#page21');// set the content
	
	$('#save').on('click', function(){ // store the new content in localStorage when the button is clicked
		var editedContent 	= theContent.html();
		localStorage.newContent = editedContent;
	});

	if(localStorage.getItem('newContent')) { // apply the newContent when it is exist ini localStorage
		theContent.html(localStorage.getItem('newContent'));
	}
</script>