1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
elinks/test/ecmascript/anchors.html

26 lines
511 B
HTML
Raw Normal View History

2021-05-12 11:08:05 -04:00
<!DOCTYPE html>
<html>
<body>
First Name: <input name="fname" type="text" value="Michael"><br>
First Name: <input name="fname" type="text" value="Doug">
2022-08-30 10:07:14 -04:00
<p>Click the button to get the outer html of anchor number 1. Anchors are counted from 0.</p>
2021-05-12 11:08:05 -04:00
<button onclick="myFunction()">Try it</button>
<a href="/" name="aaa">/</a>
<a href="/home" name="bbb">/home</a>
2021-05-12 11:08:05 -04:00
<p id="demo"></p>
<script>
function myFunction() {
var x = document.anchors.item(1).outerHTML;
window.alert(x);
2021-05-12 11:08:05 -04:00
}
</script>
</body>
</html>