Click to return to the DHTML, HTML     
NAME Attribute | name Pro...     nextSibling Property     DHTML Properties    
Web Workshop  |  DHTML, HTML & CSS

nameProp Property


Retrieves the file name specified in the href or src property of the object.

Syntax

HTML N/A
Script [ sFileName = ] object.nameProp

Possible Values

sFileName String that specifies the name of a file specified by the object, not including the path or protocol.

The property is read-only with no default value.

Example

This example uses the nameProp property to set the innerText property of a link to the file name specified by an A element.

Sample Code

<SCRIPT>
window.onload=fnInit;
function fnInit(){
   oLink.innerText=oLink.nameProp;
}
</SCRIPT>
<A ID="oLink"
   HREF="http://msdn.microsoft.com/workshop/author/dhtml/dhtmlrefs.asp">
</A>

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
A, IMG


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.