[chaiscript] Help
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Change text with JavaScript</title>
- </head>
- <body>
- <h1 id="change-text">Change text with JavaScript</h1>
- <script src="main.js"></script>
- <button onclick="changeText()">Change text</button>
- <input type="text" placeholder="Enter text" id="text-input">
- </body>
- </html>
- const mainText = document.getElementById('change-text')
- const input = document.getElementById('text-input')
- var value = input.value;
- console.log(value)
- function changeText() {
- console.log(value)
- mainText.innerHTML = value[0];
- console.log("Text changed to " + value)
- };
Editor
You can edit this paste and save as new: