Thread View: pl.comp.lang.javascript
2 messages
2 total messages
Started by Jivanmukta
Mon, 10 Jul 2023 09:12
<a href=""> does not work
Author: Jivanmukta
Date: Mon, 10 Jul 2023 09:12
Date: Mon, 10 Jul 2023 09:12
34 lines
1097 bytes
1097 bytes
In index.html file I have: <body> <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top"> <a class="navbar-brand" href="">Tron Game</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-c aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarsExampleDefault"> <ul class="navbar-nav mr-auto" id="score-list"> </ul> </div> </nav> <main role="main" class="container-fluid"> <div class="game-container"> <canvas id="myCanvas" width`0 height`0 style="border:2px solid #eee;"> </canvas> </div> </main> <!-- /.container --> </body> File index.js contains many functions, for example main(). I want to have main() called when user clicks on Tron Game text. The solution above does not work, nothing happends when Tron Game link is clicked.
Re: <a href=""> does not work
Author: zpksoft
Date: Mon, 10 Jul 2023 08:44
Date: Mon, 10 Jul 2023 08:44
13 lines
376 bytes
376 bytes
poniedziałek, 10 lipca 2023 o 09:12:23 UTC+2 Jivanmukta napisał(a): > In index.html file I have: > > <body> > > <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top"> > <a class="navbar-brand" href="">Tron Game</a> try: <a class="navbar-brand" href="#" onclick="main();">Tron Game</a> Paweł
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads