Login
·
Signup
Home
»
XtGem
»
Coding help
»
Help me on this template
» View post
Graham
Keyarn
http://baretest.xtgem.com/button
<script> function first(){ document.getElementById('main').innerHTML='<b>The first page</b>'; document.getElementById('button').setAttribute('onclick','second()'); document.getElementById('button').innerHTML='second'; } function second(){ document.getElementById('main').innerHTML='<b>The second page</b>'; document.getElementById('button').setAttribute('onclick','third()'); document.getElementById('button').innerHTML='third'; } function third(){ document.getElementById('main').innerHTML='<b>The third page</b>'; document.getElementById('button').setAttribute('onclick','first()'); document.getElementById('button').innerHTML='first'; } </script> <div id="main">default content on first load</div> <button id="button" onclick="first()">first</button>
The content will be loaded and the button will change when clicked
#
2017-02-15 22:09 (edited 2017-02-15 23:22 by
Graham
) ·
(0)
Home
»
XtGem
»
Coding help
»
Help me on this template
» View post
Online: Guests: 1
Log in