gardan06 Posted January 28, 2008 Share Posted January 28, 2008 given this: <div>Put text here.</div> is there a way in javascript to change the string inside the div from "Put text here." to something else? if yes, how? Thanks. Jay Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted January 28, 2008 Share Posted January 28, 2008 yes - this is one way: <script language="javascript"> function changeIt() { document.getElementById('myDIV').innerHTML='Something Else'; } </script> <div id="myDIV">Put text here.</div> <a href="javascript:changeIt()">Change Text - Click Here</a> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.