pjs/js/jsdj/ifcui/run/samples/misc.html

44 строки
704 B
HTML

<html>
<head>
<title>Misc. Samples</title>
</head>
<body>
<!-- debugger detects onclick handlers, but not javascript: urls -->
<a href="" onclick="alert('clicked');return false;">click me (onclick) debugger detects</a><BR>
<a href="javascript:alert('clicked')">click me (javascript:) debugger ignores</a><BR>
<!-- debugger detects simple src- includes -->
<script SRC=include.js>
</script>
<BR>
<!-- some oddball code for playing with var scoping behavior in JavaScript -->
<script>
function show(y) { document.writeln( y + ", "); }
function A()
{
var x = 1;
show(x);
B();
show(x);
}
function B()
{
show(x);
x = 2;
show(x);
}
x = 0;
show(x);
A();
show(x);
</script>
</body>
</html>