是直接返回的。就是在网页点击锚点链接,再点击内部链接,到了另一个网页,再点击返回就显示黑色长方形边框了?你看下代码:
02.html:
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<a href="#js"><h1>锚点链接</h1></a>
<a href="002.html#vscode" name="js"><h2>链接tiao'zhu</h2></a>
</body>
</html>
002.html:
</html>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<a name="vscode"><h1>链接跳转和锚点链接的结合</h1></a>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>
2020-09-15 16:28:20
代码发错了,上面的代码发错了,
这些代码才是有问题的:
02.html:
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<a href="#js"><h1>锚点链接</h1></a>
<a href="002.html#vscode" name="js"><h2>链接跳转</h2></a>
</body>
</html>
002.html:
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<a name="vscode"><h1>链接跳转和锚点链接的结合</h1></a>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>
2020-09-15 16:36:57
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星