JavaScript Reference/Javascript Properties/srcUrn — различия между версиями

Материал из Web эксперт
Перейти к: навигация, поиск
 
м (1 версия)
 
(нет различий)

Текущая версия на 08:21, 26 мая 2010

"srcUrn" Example

<!-- 
Example revised from 
The Web Programmer"s Desk Reference
by Lazaro Issi Cohen and Joseph Issi Cohen 
ISBN: 1593270119
Publisher: No Starch Press 2004
-->    
<html>
<body>
<style>
@media all {IE\:homePage {behavior:url(#default#homepage)}} 
</style>
<script language="JavaScript">
function goHomePage(){
    HP.navigateHomePage();
    event.returnValue=false; 
} 
</script>
<script language="JavaScript" for="myA" event="onmouseout">
var m = event.srcUrn;
alert("The value of property srcUrn is: "+m);
</script>
<yourNs:homepage id="HP"/>
<a id="myA" href="" onClick="goHomePage();">Navigate to your home page</a>
</body>
</html>



"srcUrn" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |event                                                         |
+----------------+--------------------------------------------------------------+



"srcUrn" Syntax and Note

Note:
Read-only property. 
Returns the URN (Uniform Resource Name) of the behavior triggering the event. 
A URN specifies the identity of a resource rather than its location.
    
Syntax:
    
window.event.srcUrn