通过单击使用HTML的按钮在浏览器中显示图像的代码 [英] code for diplaying an image in the browser by clicking a button using HTML
本文介绍了通过单击使用HTML的按钮在浏览器中显示图像的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道通过单击使用HTML的按钮在浏览器中显示图像的代码.
谢谢
Hi,
I would like to know the code for displaying an image in the browser by clicking a button using HTML.
Thanks
推荐答案
请先共享您的代码..我想您想要这样:
Please share the your code firstly .. I guess you want like this :
<head><title>Image Display Test
</title>
<script type="text/javascript">
function showImage(){
document.getElementById('loadingImage').style.visibility="visible";
}
</script>
</head>
<body>
<input type="button" value="Image Button" onclick="showImage();"/>
<img id="loadingImage" src="uorimagename.gif" style="visibility:hidden"/>
</body>
谢谢,
Ambesha
Thanks,
Ambesha
这篇关于通过单击使用HTML的按钮在浏览器中显示图像的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文