hello guy's I'm very newbie with this. i just need some help. What i wanted is in the first click text "Open" it's will change to "Close" then if you click again the "Close" it will back into "Open". Thank's to you help.
You can use this code: <html> <head> <script type="text/javascript"> var open=1; function f_click() { elem = document.getElementById("myElem"); if (open==1) { elem.innerHTML = "Close"; open=0; } else { elem.innerHTML = "Open"; open=1; } } </script> </head> <body> <a id="myElem" href="javascript:f_click();">Open</a> </body> </html> Code (markup):