获取图片地址然后显示在input中
预览:http://www.chenbincb.com.cn/cnblogs/demo1/DEMO1.html
<img src="http://www.cnblogs.com/Images/adminlogo.gif" />
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
<P></P>
<INPUT TYPE="imgurl" ID="url" NAME="imgurl">
<script>
var imgs=document.images;
for(var i=0;i<imgs.length;i++)
imgs[i].onclick=function() {
document.getElementById("url").value=this.getAttribute("src");
}
</script>
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)