HTMLの <a name="..."> タグで囲まれた文字列を返します.
stringObject.anchor(anchorName)
以下にanchorメソッドを使用したサンプルコードを示します.
<html>
<head>
<title>anchorメソッドのサンプルコード</title>
</head>
<body>
<script type="text/javascript" language="javascript">
var str = "Snoopy";
alert(str.anchor("anchor"));
</script>
</body>
</html>
以下のボタンをクリックするとサンプルコードが実行されます.
スポンサード リンク