aspxtreme

SRC Attribute | src Property

HTML Elements/DHTML Objects   Element Attributes


Sets or retrieves a URL to be loaded by the object.

Syntax


HTML <ELEMENT SRC = sURL ... >
Script object.src [ = sURL ]

Possible Values


sURL String containing the URL to be loaded.

The property is read/write with no default value.

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'">

This feature requires Microsoft® Internet Explorer® 4.0 or later.

 Show me 

Applies To

APPLET, EMBED, FRAME, IFRAME, IMG, INPUT type=image, XML



Books and more ...

Contents
HTML Elements / DOM Objects
HTML Element Attributes
CSS Attributes
DOM Object Properties
DOM-compliant Events Reference
DOM Methods Reference
DOM Collections Reference
 


Suggested Reading



Previous page Back to top Next page

Check out related books at Amazon

© 2000-2008 Rey Nuñez All rights reserved.

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

You can help support aspxtreme