26 lines
589 B
HTML
26 lines
589 B
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<style>
|
||
|
textarea{
|
||
|
overflow: hidden !important;
|
||
|
}
|
||
|
</style>
|
||
|
<script>
|
||
|
function buttonPressed() {
|
||
|
var inputText = document.getElementById("inputText").value;
|
||
|
var textBox = document.getElementById("myTextBox");
|
||
|
textBox.value += inputText + "\n";
|
||
|
textBox.scrollTop = textBox.scrollHeight;
|
||
|
}
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<textarea id="myTextBox" rows="4" cols="50" style="overflow:auto"></textarea>
|
||
|
<br>
|
||
|
<input type="text" id="inputText">
|
||
|
<button onclick="buttonPressed()">Press me</button>
|
||
|
</body>
|
||
|
</html>
|
||
|
|