asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Language References > HTML Element Attributes > SRC Attribute

SRC Attribute | src Property


Specifies the location of a resource.

APPLIES TO:   AUDIO   EMBED   FRAME   IFRAME   IMG   INPUT type=image   VIDEO   XML

Syntax

Inline <element src = strUrl...>
Script Get: strUrl = object.src   Set: object.src = strUrl

Possible Values

strUrl String containing the URL to be loaded.

The property is read/write with no default value.

Remarks


Example

The following example uses inline event handlers to dynamically set an IMG element’s src attribute.

<img src="../shared/images/samp10.jpg" 
   height=200 width=200 border=0 
   onmouseover="this.src='../shared/images/samp09.jpg'" 
   onmouseout="this.src='../shared/images/samp10.jpg'">

 Show me 



Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note