Jump to content

javascript img src help


MDanz

Recommended Posts

i pass this to a div innerhtml from javascript.

 

when i do it like this it doesn't work. it should display an image hyperlink

var newtext4=("<a href=" + number + "><img src=" + newtext2 + " /></a>");

 

if i do just text, it displays a hyperlink.

 

var newtext4=("<a href=" + number + ">" + newtext2 + "</a>");

 

any idea why?

Link to comment
https://forums.phpfreaks.com/topic/207088-javascript-img-src-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.