update rails
gem update rails
12374 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Ana Belén Ramón http://www.avidos.net/detalles
gem update rails
function preview(id1, id2){ var NewText = document.getElementById(id1).value; splitText = NewText.split(/\n/).join("<br />"); var DivElement = document.getElementById(id2); DivElement.innerHTML = splitText; }
<form action="#"> <label>Name:</label> <input type="text" id="nombre" onkeyup="preview('name', 'preview-name');" /> <label>Phone:</label> <input type="text" id="phone" onkeyup="preview('phone', 'preview-phone');" /> </form> <h2>Preview</h2> <dl> <dt>Name:</dt> <dd id="preview-name"></dd> <dt>Phone:</dt> <dd id="preview-phone"></dd> </dl>