Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Написать на JS функцию, которая на странице заменяет все текстовые поля ввода на кнопки
- <!DOCTYPE html>
- <head>
- <script type="text/javascript">
- function change() {
- let input = document.getElementsByTagName("input");
- let i = 0;
- while (i < input.length) {
- if (input[i].type == "text") {
- input[i].type = "button";
- input[i].value = "god why";
- }
- i++;
- }
- }
- </script>
- </head>
- <input type="text">
- <input type="text">
- <input type="text">
- <input type="button" value="CHANGE IT ALL" onclick="change()">
- </body>
Add Comment
Please, Sign In to add comment