зеркало из https://github.com/mozilla/pjs.git
45 строки
729 B
HTML
45 строки
729 B
HTML
<html>
|
|
<head>
|
|
<title>Properties Display Sample</title>
|
|
|
|
<script language="JavaScript">
|
|
<!-- Hide from old browsers
|
|
|
|
function showProps( ob, name )
|
|
{
|
|
var prop;
|
|
for( prop in ob )
|
|
document.writeln( name+"[\""+prop+"\"]"+" = "+ob[prop]+"<br>");
|
|
}
|
|
|
|
function CallAlert( msg )
|
|
{
|
|
alert( msg );
|
|
}
|
|
|
|
// stop hiding -->
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<form>
|
|
<INPUT TYPE="button" VALUE="Push This" onClick="CallAlert('called alert using function')">
|
|
</form>
|
|
|
|
<script language="JavaScript">
|
|
<!-- Hide from old browsers
|
|
|
|
showProps( window, "window" );
|
|
document.writeln( "<br>" );
|
|
|
|
showProps( document, "document" );
|
|
document.writeln( "<br>" );
|
|
|
|
showProps( navigator, "navigator" );
|
|
|
|
// stop hiding -->
|
|
</script>
|
|
|
|
</body>
|
|
</html> |