gecko-dev/dom/html/test/test_anchor_href_cache_inva...

31 строка
753 B
HTML
Исходник Обычный вид История

2010-02-12 22:12:00 +03:00
<!DOCTYPE HTML>
<html>
<head>
<title>Test for anchor cache invalidation</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none">
<a id="x" href="http://example.com"></a>
</div>
<pre id="test">
<script type="application/javascript">
is($("x").href, "http://example.com/");
is($("x").host, "example.com");
$("x").href = "http://www.example.com";
is($("x").href, "http://www.example.com/");
is($("x").host, "www.example.com");
$("x").setAttribute("href", "http://www.example.net/");
is($("x").host, "www.example.net");
2010-02-12 22:12:00 +03:00
</script>
</pre>
</body>
</html>