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 Link to comment https://forums.phpfreaks.com/topic/88130-problem/ 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> Link to comment https://forums.phpfreaks.com/topic/88130-problem/#findComment-450950 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.