为什么要写这个脚本
生活中很多时候会经常登录一个论坛或者网页
但是每次打开浏览器都要输一遍网址,或者点开收藏的书签
这样远远不如在桌面上打开文件点两下快,还能装X,多好
创新互联是专业的许昌网站建设公司,许昌接单;提供成都网站设计、成都网站制作,网页设计,网站设计,建网站,PHP网站建设等专业做网站服务;采用PHP框架,可快速的进行许昌网站开发网页制作和功能扩展;专业做搜索引擎喜爱的网站,专业的做网站团队,希望更多企业前来合作!
前提条件
需要会一些基础的html,javascript代码
上代码
js脚本
使用
将上面的代码复制到桌面的新建文档里

另存为--文件的后缀名要改成.html 保存类型:所有文件 编码选择UTF-8 不然没法显示中文

完成后桌面会新增一个图标

双击打开

点击新建窗口打开

浏览器有时候可能会拦截脚本文件,点击允许即可

完成

可以自行更改的代码
- var message=confirm("是否打开") //括号里的内容可以自定义
- window.open('https://home.51cto.com/space?uid=14299999','_blank','width=400,height=500') //连接,窗口大小可自定义
- document.write("重新选择") //点否返回的内容可自定义
- //value的值可以自定义
拓展
有强迫症想让按键在中间的话,可以在中加入标签


想让按键更大点的话,再加入代码,大小自己设置


还有很多js代码,这里就不一一细说了,还想进一步了解可到各大论坛,或网课平台进一步学习
网站标题:js实现网页跳转脚本
URL地址:
http://njwzjz.com/article/gjeioh.html