+ 1

Html template

Hello guys, please I do have a question, how to display html template by using onclick button Function in javascript?

25th Aug 2020, 4:18 AM
Mohamed
6 odpowiedzi
+ 3
html: <button id = "btn" onclick = "func">click</button> Js: function func() { alert("hello"); }
25th Aug 2020, 4:23 AM
Namit Jain
Namit Jain - avatar
+ 2
"The <template> tag is used as a container to hold some HTML content hidden from the user when the page loads." source W3schools https://www.w3schools.com/tags/tag_template.asp HTML Tag Reference https://www.w3schools.com/tags/default.asp
25th Aug 2020, 5:33 PM
ODLNT
ODLNT - avatar
+ 1
Html template: is something that it doesn't show in the browser until you press the button
25th Aug 2020, 4:38 AM
Mohamed
0
No! My question is, how to display TEMPLATES?
25th Aug 2020, 4:27 AM
Mohamed
0
Thanks, the problem is that I want to write everything in html
25th Aug 2020, 4:54 AM
Mohamed