string.anchor( anchorname )
<html><head><title>JavaScript String anchor() Method</title></head><body><script type="text/javascript">var str = new String("Hello world");alert(str.anchor( "myanchor" ));</script></body></html>这将产生以下结果:
<a name="myanchor">Hello world</a>