How to do partition using frameset tag in JavaScript

Hey Folks,
I am up with another tutorial of JavaScript. In this tutorial, we will learn how to do partition using frameset tag in JavaScript. You must have noticed that every website is divided into many segments.  So like on one side ads will be displayed and on another side, all the bookmarks are there.

So let’s begin with the tutorial. Frameset tag defines how the web page is divided into frames. It can divide web page column wise or row wise the way you want. Under this, every frame can hold one or more frame.

Code to do partition using frameset tag in JavaScript

<html>
<head><title>ut</title>
</head>
<frameset cols="25%,50%,25%">
<frame src="a1.html">
{
<frameset rows="25%,75%>
<frame src="a3.html">
<frame src="a4.html">
</frameset>
}
<frame src="a2.html">
<frame src="a3.html">
</frameset>
</html>

We have used cols attribute under frameset tag to divide the frames into columns into required ratio. But for each ratio, we have to assign a link which gets opened when we click on it.

We have to assign link for every distribution we have made. So like if we divided our page into three parts so we have to define <frame src=”link”> for all the three parts. And we can also divide the page further.

partition using frameset tag in JavaScript

So let us assume we want to divide the middle one again into two ratios again as shown in the picture above. So for that, we use nested <frameset> as we can now divide that particular segment further into rows or column the way we want.

I hope you understood the code well. Feel free to ask if you have any doubts in the comment section below.

 

Leave a Reply

Your email address will not be published. Required fields are marked *