文件4-13main.html:
anchors数组示例
文件ch4-13-anchor1.html:
anchors:frame 1
function linkToAnchor(num){
if (parent.anchors2.document.anchors.length>=num)
parent.anchors2.location.hash=num
else
alert("目标不存在!");
}
单击以下按钮可跳转到需要的目标:
name="anch0" onclick="linkToAnchor(0)">
文件ch4-13-anchor2.html:
anchors:frame 2
Some persons
Li MingWang LinZhang ShanZhu YunMa LiLei Feng
Some countries
ChinaCanadaU.S.AJapanBrazil
Some colors
redbulegreenyellowgray
Some coursesData Structure and Programming
Operating SystemComputer NetworksArtificial Intelligence