如何向< img src添加ID [英] how to add an ID to <img src

查看:602
本文介绍了如何向< img src添加ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何为以下代码添加ID''img src':

img src =doctor.png

I would like to know on how to add an ID to ''img src'' for my following code:
img src="doctor.png"

推荐答案

我假设您要从后面的代码访问图像元素,因此您还需要包含runat =server属性。

I''m assuming you want to access the image element from code behind, so you''ll need to include the runat="server" attribute as well.
<img id="yourId"  runat="server" src="doctor.png" />


这篇关于如何向&lt; img src添加ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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