<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>JS</title>
</head>
<body>

  <div class="" style="height: 2000px;">top top top top top top top top</div>
  <div style="background-color:#ccc ; font-size: 2em;"><a href="javascript:scroll(0,0);">top</a></div>

  <div style=" font-size: 2em;"><a onclick="window.scrollTo(0,0);">top</a></div>
</body>
</html>

JS跳转到顶部的方法的更多相关文章

  1. js 跳转的几种方法收藏

    history.go(-n) 返回上一页(n 为返回前几页) window.location.reload(); 刷新当前页面 history.go(-1);window.locatoin.reloa ...

  2. 常用的js跳转页面方法实现汇总

    1.window.location.href方式 <script language="javascript" type="text/javascript" ...

  3. js跳转页面方法大全

    js跳转页面方法大全<span id="tiao">3</span><a href="javascript:countDown"& ...

  4. 实现网页页面跳转的几种方法(meta标签、js实现、php实现)

    1.meta标签实现 只需在head里加上下面这一句就行了,在当前页面停留0.1秒后跳转到目标页面  代码如下 复制代码 1 <meta http-equiv="refresh&quo ...

  5. js 控制页面跳转的5种方法

    js 控制页面跳转的5种方法 编程式导航: 点击跳转路由,称编程式导航,用js编写代码跳转. History是bom中的 History.back是回退一页 Histiory.go(1)前进一页 Hi ...

  6. Jsp页面跳转和js控制页面跳转的几种方法

    Jsp 页面跳转的几种方法 1. RequestDispatcher.forward() 在服务器端起作用,当使用forward()时,Servlet engine传递HTTP请求从当前的Servle ...

  7. react-router5.x 的配置及其页面跳转方法和js跳转方法

    https://blog.csdn.net/sinat_37255207/article/details/90745207 上次用react-router 的时候  还是3.x 很久不用 已经到rea ...

  8. js跳转页面的方法

    js跳转页面的几种方法 第一种:(跳转到b.html) <script language="javascript" type="text/javascript&qu ...

  9. SEO黑页以及门页框架和JS跳转实现方法

    在去年大家还在针对第三方博客狂轰乱炸,比如:webs.com.blogspot.com.weebly.com主要是因为本身博客平台的权重,再就是低廉的成本,主需要注册,没有域名和服务器的投入.排名也非 ...

随机推荐

  1. ubuntu用终端卸载软件

    我们需要知道我们要卸载的软件的名称,sudo apt-get autoremove --purge 之后输入软件名称,可以先输入前缀之后按tab,会自动补全. 现在不要急着回车,我们来讲解一下这个命令 ...

  2. Codeforces Round #364 (Div. 2) Cards

    Cards 题意: 给你n个牌,n是偶数,要你把这些牌分给n/2个人,并且让每个人的牌加起来相等. 题解: 这题我做的时候,最先想到的是模拟,之后码了一会,发现有些麻烦,就想别的方法.之后发现只要把它 ...

  3. CF534A Exam 构造

    An exam for n students will take place in a long and narrow room, so the students will sit in a line ...

  4. vacabulary1

    The hard hat is rigid,so nothing will hurt my head. glue 胶水vegetarian 素食者: 素食主义者:素食的 North Korea 朝鲜S ...

  5. [AIR] 在 Adobe AIR 中为不同屏幕尺寸的多种设备提供支持

    转自:http://www.adobe.com/cn/devnet/air/articles/multiple-screen-sizes.html 无论是改编原本在浏览器 Flash Player 中 ...

  6. 反人类的MyEclipse之-MyEclipse设置Console字体大小

    Windows-->Preference-->General-->Apperence-->Colors and Fonts --> Debug -->Console ...

  7. Maven pom.xml 配置详解

    http://niuzhenxin.iteye.com/blog/2042102 http://blog.csdn.net/u012562943/article/details/51690744 po ...

  8. 21.Merge Two Sorted Lists(链表)

    Merge two sorted linked lists and return it as a new list. The new list should be made by splicing t ...

  9. DNS加速

    http://elingwange.iteye.com/blog/1563497 http://blog.csdn.net/lize1988/article/details/10404645 java ...

  10. struts2页面上如何操作字符串

    <s:if test="prodName.length()>15"><s:property value='prodName.substring(0,15)' ...