4
Guys I’m starting programming has little time and I have to register only I want the information typed by the user as the name, email and age appear through an "Alert" after he click on the button "Accept".
My HTML and Javascript files are already "interconnected", I do not know if it is possible to do so, if it is not present me the best way to do this using only HTML and Javascript, and if it is please show me how.
My HTML file
<label for="nome">Nome:</label>
<input type="text" name="nome" size="20" maxlength="20" placeholder="Seu nome"/><br><br>
<label for="senha">Senha:</label>
<input type="password" name="senha" size="20" maxlength="25" placeholder="Sua senha"/><br><br>
<input type="button" value="Aceitar" onClick="aceitar()">
<a class="none" href=javascript:history.back();><input type="button" value="Cancelar"></input></a>
</form>
My JS file
function aceitar(){
alert("Aqui seria a concatenação")
}
On hold
Att,
Lone
I remember that it is also possible to use this "getElementById" next to the onClick function with images, because I will also need the user to click on the image the program call another and if he clicks back to the previous image or will be two images. What would be the right way to do this ? And thank you for the previous answer.
– Lone Tonberry
getElementById serves to reference any element of the DOM, which you will do with the element after only depends on the context. As for what you asked, it depends a lot. It would be the case to open a new question and try to explain in as much detail as possible. But take a prior search for the site, because already have some questions answered about image galleries.
– Bacco
I took a look at galleries but it doesn’t have exactly what I want, what I wanted was to make an effect that when clicking on the image it changed color calling another and if I clicked again it would change to the color that was at the beginning or be the same image. But I’m not in need of it urgently, another day I’ll do another topic however you managing to help me here would already help.
– Lone Tonberry
@Lonetonberry it seems to me that what you asked has been answered, if you have any new questions open a new question.
– Maniero