2
I am very beginner in programming, however, to train I am doing an RPG in Browser, and the home page is the choice of class, and I want the person to choose, click the image and this image redirect to a new page, using the event "onclick"depending on the person’s choice. Would it be possible?
<html>
<head>
<title> RPG in Browser </title>
<link href="../../CSS/Projeto 01/Página 01.css" rel="stylesheet">
</head>
<div id="TabelaCentral">
<table id="Tabela">
<tr>
<td id="Classe"> <b id="Font35"> Mago </b> </td>
<td id="Classe"> <b id="Font35"> Arqueiro </b> </td>
<td id="Classe"> <b id="Font35"> Guerreiro </b> </td>
</tr>
<tr>
<td> <img src="../../Imagens/Projeto 01/Página 01/Mago.jpg" id="ImagemClasse" onClick="alert ('Clicou')"> </td>
<td> <img src="../../Imagens/Projeto 01/Página 01/Arqueiro.jpg" id="ImagemClasse"> </td>
<td> <img src="../../Imagens/Projeto 01/Página 01/Guerreiro.jpg" id="ImagemClasse"> </td>
</tr>
</table>
</div>
Perry, do you want to use javascript for this? Because it is not necessary, only with html you can create a clickable image, with the <a> tag and within it the <img tag>.
– Daniel Mendes
has a game that was written only with javascript, candybox, which was not necessary for the developer to use more than one page, maybe you can write everything on one page, and then hide and display the text according to what you want to display on the screen.
– riki481