html - href 目标 div 容器同页

标签 html css

<html>
<head>
  <title>Untitled Document</title>
  <style>
     #right
     {
       border:3px solid;
       width:100%;
       height:1000px;
       float:left;
     }
  </style>
</head>
<body>
  <a href="file:///E|/Practice/Assignment/page3.html" >Click</a>
  <div id="right"> heloo</div>
</body>
</html>

当我点击链接目标时出现新标签,但我想在同一页面上打开 div 容器任何好友帮助我....

最佳答案

使用target="_self"

 <a href="file:///E|/Practice/Assignment/page3.html" target="_self">Click</a>

关于html - href 目标 div 容器同页,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28263938/

相关文章:

jquery - 响应式主题 : Keep "text" fixed in the picture (html, css)

html - 推特 Bootstrap : Why the z-index: 2 for some states?

CSS 背景图片网址未显示

css - HTML 分区/居中

html - 在不禁用该字段的情况下限制选择 SELECT 选项

html - 不同操作系统/屏幕的不同代码

ios - 移动 Safari Web App - 点击和手势 react 迟钝

iOS 输入字段 - 键入文本时不可见

html - 使用 css 或 html 将行绑定(bind)在一起

html - IE 中具有最大宽度的 SVG 问题