So sweet and simple.
Found this script on a board.
<script type="text/javascript">
function showtext(thetex t) {
if (!document.getE lementById) return false;
document.getEle mentById("toggl e").innerHTM L = thetext;
}
</script>
<a href="#" onClick="showte xt('text A'); return false">link 1</a> <br>
<a href="#" onClick="showte xt('text B'); return false">link 2</a>
<div id="toggle"></div>
Question is, can I replace ("textA") with a variable like (text[1]) ??
Found this script on a board.
<script type="text/javascript">
function showtext(thetex t) {
if (!document.getE lementById) return false;
document.getEle mentById("toggl e").innerHTM L = thetext;
}
</script>
<a href="#" onClick="showte xt('text A'); return false">link 1</a> <br>
<a href="#" onClick="showte xt('text B'); return false">link 2</a>
<div id="toggle"></div>
Question is, can I replace ("textA") with a variable like (text[1]) ??
Comment