sorry als ich gestern um viertel nach 1 gelesen hatte, fehlte mir gänzlich die lust noch zu scripten..
HTML
<!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" lang="de">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script type="text/javascript">
function transferText(){
var source = document.getElementById('myField');
var target = document.getElementById('myArea');
var sourceText = source.value;
var targetText = target.value;
target.value = targetText + ' ' + sourceText;
}
</script>
</head>
<body>
<input type="text" id="myField" value="bbbbbb" />
<textarea id="myArea">aaaaaaa</textarea>
<input type="button" onclick="transferText();" value="wert übertragen" />
</div>
</body>
</html>
Alles anzeigen