<!DOCTYPE html>
<html>
<body>
<p>Click the button to create an HTML anchor around a string.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
var txt = "Chapter 10";
txt.anchor("chap10");
alert(txt.anchor("chap10"));
}
</script>
</body>
</html>