aktuelle.kurse/m133/4_Modulinhalte_und_Uebungen/07-JQuery-skript/07-jQueryLoesungen/jQuery4.html

34 lines
939 B
HTML
Raw Normal View History

2022-02-24 09:37:43 +01:00
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.2.4.js""></script>
<script type="text/javascript">
$(document).ready(function() {
$("#btnsubmit").click(function () {
var txtinput = $('input:text[name=txtinput]').val();
alert(txtinput);
$('#txtoutput').val(txtinput);
});
});
</script>
<style>
input {
margin-left: 3.2em;
border: 1px solid tomato;
border-radius: 4.2px;
padding: 3px;
}
</style>
</head>
<body>
<h2>Copy Textbox value</h2>
<div id='input'>
<table>
<tr><td>Input Textbox:</td><td><input type='text' id='txtinput' name='txtinput'></td></tr>
<tr><td>Output Textbox:</td><td> <input type='text' id='txtoutput' name='txtoutput'></td></tr>
</table>
<input type='submit' id='btnsubmit' value='Copy'>
</div>
</body>
</html>