ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Add image element to DIV using JavaScript<p>kindly refer the below.</p> <pre class="brush: js">&lt;html&gt; &lt;body&gt; &lt;script type=&#34;text/javascript&#34;&gt; window.onload=function(){ var elem = document.createElement(&#34;img&#34;); elem.setAttribute(&#34;src&#34;, &#34;http://img.zohostatic.com/discussions/v1/images/defaultPhoto.png&#34;); elem.setAttribute(&#34;height&#34;, &#34;768&#34;); elem.setAttribute(&#34;width&#34;, &#34;1024&#34;); elem.setAttribute(&#34;alt&#34;, &#34;Flower&#34;); document.getElementById(&#34;placehere&#34;).appendChild(elem); } &lt;/script&gt; &lt;div id=&#34;placehere&#34;&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt;</pre>https://www.aspforums.net:443/Threads/139464/Add-image-element-to-DIV-using-JavaScript/https://www.aspforums.net:443/Threads/139464/Add-image-element-to-DIV-using-JavaScript/Fri, 21 Sep 2018 03:02:36 GMT