Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- <meta charset="utf-8">
- <script type="text/javascript">
- //функция вызывается при нажатии на кнопку
- function appnd(){
- let value1 = document.getElementById("inp1").value;
- let elem2 = document.getElementById("inp2");
- elem2.value= elem2.value + value1;
- }
- </script>
- </head>
- <body>
- <input id="inp1" type="text" name="inp1" placeholder="Введите строку">
- <input id="inp2" type="text" name="inp2" placeholder="Введите еще строку">
- <!— кнопка —>
- <input onclick="appnd();" type="button" name="" value="Склеить строки">
- </body>
- </html>
Add Comment
Please, Sign In to add comment