i am trying to put a variable using script on an image url but it does not seem to work instead the url display the encoded text
<img src="<script type="text/javascript">document.write(image_one);</script>" 
i am trying to put a variable using script on an image url but it does not seem to work instead the url display the encoded text
<img src="<script type="text/javascript">document.write(image_one);</script>" 
 
    
    You can't put an element inside an attribute value.
You can either generate the entire element from JavaScript, or you can create it with a default value for the src and then use DOM to change the src to something else.
