日期:2014-05-16 浏览次数:20426 次
<script type="text/javascript"> function func( var picholder=document.createElement("img"); picholder.setAttribute("alt","the image you choosed"); picholder.setAttribute("id","picholder"); //将picholder添加到p之前 document.getElementByTagName("body")[0].appendChild(picholder); ) </script>
<html> <head></head> <body> <p>想要在下面增加一张图片</p> </body> </html>