Kod: Zaznacz cały
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<meta http-equiv="Content-Language" content="pl" />
<title>Generator</title>
<script type="text/javascript">
function generuj
{
html +=
'<div class="logo"> \n' +
'<font size="5"><center>'+document.getElementById('title').value;</center></font>n' +
'<font size="3">'+document.getElementById('motto').value;</font>\n' +
'</div>';
}
</script>
</head>
<body>
<h1 style="text-align: center">Generator loga</h1><hr />
<br /><br />
<form action="javascript:void(0)" onsubmit="generuj(this); return false" onreset="if (window.confirm('Czy na pewno chcesz wyczyścić wszystkie dane?')) { window.location.reload() } else return false">
<table style="margin-left: auto; margin-right: auto">
<tr>
<th class="col">Tytuł:</th>
<td><input type="text" name="title" class="long" /></td>
</tr>
<tr>
<th class="col">Opis:</th>
<td><input type="text" name="motto" class="long" /></td>
</tr>
<tr class="tfoot">
<td colspan="2"><input type="submit" value="Generuj" class="generuj" />
<input type="reset" value="Wyczyść" /></td></tr>
</table>
<hr />
<fieldset>
<legend>index.html</legend>
<textarea name="html" cols="50" rows="10" style="width: 100%" readonly="readonly" onfocus="this.select()"></textarea>
<div style="text-align: right"><input type="button" value="Zaznacz wszystko" style="font-size: 12px" onclick="this.form.elements['html'].select(); this.form.elements['html'].focus()" /></div>
</fieldset>
</form>
</body>
</html>
---- EDIT ----
Może '+document.getElementById('title').value; czymś zastąpić