1 |
wakaba |
1.1 |
<!DOCTYPE html> |
2 |
|
|
<html> |
3 |
|
|
<head> |
4 |
|
|
<title>String.anchor (String) and document.anchors</title> |
5 |
|
|
</head> |
6 |
|
|
<body> |
7 |
|
|
<h1><code><var>String</var>.anchor (<var>String</var>)</code> and |
8 |
|
|
<code>document.anchors</code></h1> |
9 |
|
|
|
10 |
|
|
<script type="text/javascript"> |
11 |
|
|
document.write ('<p><code>document.anchors.length</code> (before): ' |
12 |
|
|
+ document.anchors.length + '</p>'); |
13 |
|
|
|
14 |
|
|
var s = 'text content'.anchor ('name'); |
15 |
|
|
|
16 |
|
|
document.write ('<p><code>document.anchors.length</code> (after): ' |
17 |
|
|
+ document.anchors.length + '</p>'); |
18 |
|
|
</script> |
19 |
|
|
|
20 |
|
|
</body> |
21 |
|
|
</html> |