Greetings, you can use the link below: x.thunkable.com/copy/e8983a24a88d823ee1755068135c8301
@TheConnection-d4l3 ай бұрын
how can u change it to a new page with button
@DrJLearning3 ай бұрын
Hi, CodePen itself doesn't support multiple pages in the traditional sense like a web server does. You could simulate new pages as follows: <!-- HTML --> <div id="content"> <button onclick="loadPage('home')">Home</button> <button onclick="loadPage('about')">About</button> <button onclick="loadPage('contact')">Contact</button> <div id="page-content"></div> </div> <!-- JavaScript --> <script> function loadPage(page) { const pageContent = { home: "<h1>Welcome to Home</h1><p>This is the home page content.</p>", about: "<h1>About Us</h1><p>This is the about page content.</p>", contact: "<h1>Contact Us</h1><p>This is the contact page content.</p>" }; document.getElementById('page-content').innerHTML = pageContent[page]; } </script>
@honey14895 ай бұрын
thank you so much sir🙏
@thedeviantdeuter6 ай бұрын
you are good, thanks
@shorajrona61626 ай бұрын
Helpful videos
@heitorsobrenome94076 ай бұрын
How does the HTML part link to javascript? I didn't see any script or source in the HTML codes. Is it not necessary to make this link in Codepen?
@DrJLearning6 ай бұрын
In CodePen, you don’t see the <script> or <source> tags in the HTML panel because CodePen automatically links your JavaScript code to the HTML. This makes it more convenient for quick prototyping and sharing code snippets. If you’re using a traditional HTML file outside of CodePen, you would need to include the <script> tags manually.
@heitorsobrenome94076 ай бұрын
@@DrJLearning Thank you very much, sir. I am student of programming. Thank you!