MDanz Posted February 22, 2010 Share Posted February 22, 2010 how to make var newtext2 a hyperlink? the hyperlink is a php variable. I've only included this line of code. var newtext2 = obj( "reply" ).value; Link to comment https://forums.phpfreaks.com/topic/192902-make-variable-a-hyperlink/ Share on other sites More sharing options...
ohdang888 Posted February 22, 2010 Share Posted February 22, 2010 what do you mean? you want to make its value a link? var newtext2 = obj( "reply" ).value; document.getElementById('test').href = "www.google.com"; document.getElementById('test').innerHTML = newtext2; with this html: <a id="test"></a> Link to comment https://forums.phpfreaks.com/topic/192902-make-variable-a-hyperlink/#findComment-1016105 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.