Loading Dev Articles Topics...
Loading Forum Links...
Loading Dev Shed Topics...
Loading ASP Free Topics...
Loading SEO Topics...
...
In our last tutorial we covered JavaScript Errors. We learned to work with the OnError event, the Try...Catch statement, and Throw to create exceptions. In this episode we will go over JavaScript String Objects and learn to use them.
The Anchor method creates an HTML anchor. Here is the code:
<html>
<body>
<script type="text/javascript">
var sometext="Here is some text!"
document.write(sometext.anchor("myanchor"))
</script>
</body>
</html>
The result of this code would be: Here is some text!
In HTML, the equivalent code would be:
<a name="myanchor">Hello world!</a>