Menu
Should be a simple toggle display, but seems to change only ONE time.
Any idea what I doing wrong?
[code]
<html>
<head>
<script type=”text/javascript”>
function changeLink2() {
var sel = document.getElementById(‘MyButton’); // alert(sel.value);
if (sel.value == ‘Changed to 1’) { sel.value = “Changed To 2”; }
else { sel.value = “Changed To 1″; }
}
</script>
</head>
<body>
<input id=”MyButton” type=”button” onclick=”changeLink2()” value=”Change link”>
</body>
</html>