luajitos

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

page2.html (729B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4     <title>Page 2</title>
      5 </head>
      6 <body>
      7     <h1>Page 2</h1>
      8     <p>You navigated to page 2!</p>
      9 
     10     <p><a href="test.html">Go back to Page 1</a></p>
     11 
     12     <h2>Script Test</h2>
     13     <button onclick="alert('Hello from Page 2!')">Click Me</button>
     14     <button onclick="showMessage()">Call Function</button>
     15 
     16     <p id="message">Message will appear here</p>
     17 
     18     <script>
     19         console.log("Page 2 loaded!")
     20 
     21         function showMessage()
     22             local msg = query("#message")
     23             if msg then
     24                 msg.textContent = "Function was called!"
     25             end
     26             alert("showMessage() called!")
     27         end
     28     </script>
     29 
     30     <script src="app.lua"></script>
     31 </body>
     32 </html>