Se non vuoi fare una cosa fatta bene, puoi anche inserire i tag di formattazione dentro il div:
codice:
<script type="text/javascript">
function copia(ff) {
var str = "";
str += "<font ...>" + ff.nome.value + "</font> ";
str += "<font ...>" + ff.cognome.value + "</font>
";
str += "<font ...>" + ff.via.value + "</font>
";
str += "<font ...>" + ff.cap.value + "</font> ";
str += "<font ...>" + ff.citta.value + " ";
str += "(" + ff.prov.value + ")</font>";
document.getElementById('modificabile').innerHTML = str;
}
</script>
Solo che ottieni un codice deprecabile.
La cosa fatta bene sarebbe:
codice:
<div id="nomecogn">Nome Cognome</div>
<div id="indir">via</div>
<div id="capcit">CAP Citta` (Provincia)</div>
E poi il JS:
<script type="text/javascript">
function copia(ff) {
document.getElementById('nomecogn').innerHTML = ff.nome.value + " " + ff.cognome.value + "
";
document.getElementById('indir').innerHTML = ff.via.value;
document.getElementById('capcit').innerHTML = ff.cap.value + " " + ff.citta.value + " " + "(" + ff.prov.value + ")";
}
</script>
Ciao
Michele