Jump to content

about 1st tab


Chong hyo, Rhee

Recommended Posts

Hello,

Good evening!

I now, just started html , javascript.

and I watched code , as you see in the link below,

js_hover tabs  is good for my study.

----------------------------------------------------------------------------------------------

https://www.w3schools.com/howto/howto_js_hover_tabs.asp

 

 

but, I 'd like to make  the 1st tab content is show, when the page is loading,  like  link below

https://www.w3schools.com/howto/howto_js_full_page_tabs.asp

 

It would be great, You let me know about this.

Thank you,

Your regards Chong hyo, Rhee

Link to comment
Share on other sites

Move the id="defaultOpen"

From:

<button class="tablink" onclick="openPage('Home', this, 'red')">Home</button>
<button class="tablink" onclick="openPage('News', this, 'green')" id="defaultOpen">News</button>

To:

<button class="tablink" onclick="openPage('Home', this, 'red')" id="defaultOpen">Home</button>
<button class="tablink" onclick="openPage('News', this, 'green')" >News</button>

 

BTW, welcome to the forums.

Edited by JMRKER
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...