调用 anchor 方法来在 String 对象外创建一个命名的锚点。下面示例说明了 anchor 方法是如何实现这个的: var strVariable = "This is an anchor" ;
strVariable = strVariable.anchor("Anchor1");
执行完最后一条语句后 strVariable 的值为: <A NAME="Anchor1">This is an anchor</A>
不检查该标记是否已经被应用于该字符串。