弹出图片 [英] popup image

查看:75
本文介绍了弹出图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我正在使用数据列表Web控件以7列3行的画廊格式显示图像.从数据库中检索图像以及图像标题和图像来源类别.但是仅显示图像如上.如何使图像可单击,单击图像时会打开一个弹出窗口,其中包含图像,图像来源的类别和图像标题.
谢谢

Hi I am displaying my images in a gallery format with 7 columns and 3 rows using the datalist web control. The images, along with the image title and the category the image comes from are retrieved from a database. But only the image is displayed as above. How can I make the images clickable and when the Image is clicked a popup window is opened with the Image in it, the category the image comes from and the image title.
Thanks

推荐答案

您可以通过一些javascript事件来处理此问题.

<img src="..." click=window.open(...) />

更复杂的方法包括创建一个div用作弹出窗口,并在单击图像时显示它.
You can handle this with some javascript event.

<img src="..." click=window.open(...) />

More sophisticated approaches would involve create a div to use as the popup and displaying it when the image is clicked.


这篇关于弹出图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆