Skip to content

Tag: html

How to print table rows data in console

I’ve created dynamic table rows using javascript for loop and I want to fire a click event on row in a way that whenever user clicks on any row it should be visible in console log. I know there are many answers for this but I tried and none helping me and some prints as undefined. Here is what I

Embedding HTML code with verbatim string and not file name

I am looking for a way to embed HTML code in a page. I already know that the embed element can do this for me: However, the embed element takes an html file as src. I am wondering if I could pass a verbatim string (as the HTML code) to the embed element. Is this doable with any other mechanism?

Redirect routes in HTML using Javascript

I have 3 html files that I want to link together. The three files are button.html, option1.html, option2.html and all three files are stored in one src folder. The button.html is a simple webpage that contains two buttons: and the two other .HTML file are regular pages each w/ different content. I’m not…