常用网址汇总成一个网页,需要可以选择chrome或者IE浏览器打开,网址都是IP地址,基于IE浏览器开发,因此默认选择IE浏览器打开,跳转到chrome浏览器打开。

<!DOCTYPE html>
<html lang="zh-CN"><head profile="http://gmpg.org/xfn/11"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>常用网址</title><link rel="shortcut icon" href="favicon.ico" /><link href="./index/css/bootstrap.min.css" rel="stylesheet" media="screen" /><link href="./index/css/style.css" rel="stylesheet" /><link href="./index/css/bootstro.min.css" rel="stylesheet" /><link href="./index/css/bootstrap-responsive.min.css" rel="stylesheet" /><!--[if lt IE 9]><![endif]--><script>
function test(myurl) {
/*
创建ActiveXObject实例,只在IE下有效,才可以创建
*/
var url = myurl;
var objShell= new ActiveXObject("WScript.Shell");
/*
命令参数说明
cmd.exe /c dir 是执行完dir命令后关闭命令窗口。
cmd.exe /k dir 是执行完dir命令后不关闭命令窗口。
cmd.exe /c start dir 会打开一个新窗口后执行dir指令,原窗口会关闭。
cmd.exe /k start dir 会打开一个新窗口后执行dir指令,原窗口不会关闭。
这里的dir是start chrome www.baidu.com//用谷歌浏览器打开百度
*/
//objShell.Run("cmd.exe /c start chrome www.baidu.com",0,true);
var cmd = "cmd.exe /c start chrome " + url;objShell.Run(cmd, 0, true);//objShell.Run("cmd.exe /c start chrome myurl",0,true);}
</script></head><body><header class="title"><section class="container"><!--[if IE 8]>
<div class="alert">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>警告!</strong> 您的浏览器版本过低,可能部分功能无法使用.
</div>
<![endif]--><hgroup><h1 class="side">常用网址链接汇总</h1><h2 class="side"><p>IE浏览器</p></h2></hgroup></section><section id="head-bottom1"><script src="https://www.pythontab.com/statics/js/coop/docs_header.js?v=095" type="text/javascript"></script></section></header><section class="bread"><ul class="breadcrumb container"></ul></section><section class="container"><article class="content"><ul class="thumbnails"><li class="span4"><section class="thumbnail"><a href="http://docs.pythontab.com/tensorflow/" target="_blank"><img class="img-rounded lazy" src="./index/images/textloading.gif" data-original="./index/images/tensorflow_logo.jpg"alt="手册" style="display: inline;" /></a><h3 class="text-left">手册</h3><section style="height:35px;padding:0 5px 0 0;"><section class="btn-group pull-right"><button class="btn btn-info" target="_blank" onclick="test('http://docs.pythontab.com/tensorflow/')">Chrome打开</button> <a href="http://docs.pythontab.com/tensorflow/" class="btn btn-info" target="_blank">IE打开</a></section></section></section></li></ul></article></section><section class="container"><nav class="pager"></nav></section><footer class="footer"><section class="container"><p>反馈邮箱:<a style="padding:0 5px 0 0" href="http://webmail.51biz.com/" target="_blank">你的邮箱</a><br>运维组</p></section></footer><script src="/index/js/jquery-1.10.1.min.js"></script>
<script src="/index/js/jquery.lazyload.min.js"></script>
<script src="/index/js/jquery.scrollUp.min.js"></script>
<script src="/index/js/bootstro.min.js"></script>
<script src="/index/js/bootstrap.min.js"></script>
<script src="/index/js/basic.js"></script></body>
</html>

关键js代码如下:

<script>function test(myurl) {
/*
创建ActiveXObject实例,只在IE下有效,才可以创建
*/
var url = myurl;
var objShell= new ActiveXObject("WScript.Shell");
/*
命令参数说明
cmd.exe /c dir 是执行完dir命令后关闭命令窗口。
cmd.exe /k dir 是执行完dir命令后不关闭命令窗口。
cmd.exe /c start dir 会打开一个新窗口后执行dir指令,原窗口会关闭。
cmd.exe /k start dir 会打开一个新窗口后执行dir指令,原窗口不会关闭。
这里的dir是start chrome www.baidu.com//用谷歌浏览器打开百度
*/
//objShell.Run("cmd.exe /c start chrome www.baidu.com",0,true);
var cmd = "cmd.exe /c start chrome " + url;objShell.Run(cmd, 0, true);//objShell.Run("cmd.exe /c start chrome myurl",0,true);}</script>

网页关键代码如下:

 <li class="span4"><section class="thumbnail"><a href="http://docs.pythontab.com/tensorflow/" target="_blank"><img class="img-rounded lazy" src="./index/images/textloading.gif" data-original="./index/images/tensorflow_logo.jpg"alt="TensorFlow中文手册" style="display: inline;" /></a><h3 class="text-left">TensorFlow中文手册</h3><section style="height:35px;padding:0 5px 0 0;"><section class="btn-group pull-right"><button class="btn btn-info" target="_blank" onclick="test('http://docs.pythontab.com/tensorflow/')">Chrome打开</button> <a href="http://docs.pythontab.com/tensorflow/" class="btn btn-info" target="_blank">IE打开</a></section></section></section></li>

显示结果如下:

点击跳转:

正常工作。

IE浏览器里面链接点击在Chrome浏览器打开相关推荐

  1. html打开浏览器协议,通过私有协议在Chrome浏览器网页中打开本地程序

    最近甲方有这样一个需求:两套系统,一套基于Chrome开发,一套基于IE开发,想要在Chrome中增加一个链接,然后进入IE开发的系统.也就是说,想要在Chrome中创建链接跳转到IE浏览器指定页面, ...

  2. chrome浏览器的跨域设置 Google Chrome浏览器下开启禁用缓存和js跨域限制--disable-web-security...

    chrome用户默认路径 Win7:C:\Users\[用户名]\AppData\Local\Google\Chrome\User Data\ XP:C:\Documents and Settings ...

  3. chrome浏览器内存_如何在Google Chrome浏览器中清除内存

    chrome浏览器内存 The latest development builds of Google Chrome include a way to make the browser clean u ...

  4. html禁止浏览器修改字号,在高版本Chrome浏览器中自定义强制样式表修改页面字体显示...

    Firefox有一个比较好的功能,就是禁用页面指定的字体,改为使用用户强制指定的字体来渲染也页面.但是在Chrome中却没有这样的设置,Chrome的原意是尊重网页设计者的意图,尽可能原样显示页面.但 ...

  5. chrome浏览器安全检查_为您的Chrome浏览器检查皮肤

    chrome浏览器安全检查 作者 克里斯·科耶尔 已发表 2011年8月16日 翻译自: https://css-tricks.com/skin-your-chrome-inspector/ chro ...

  6. 猫抓 浏览器插件安装教程,适用Chrome浏览器和Edge浏览器

    软件截图 软件介绍 猫抓是一款网页媒体嗅探工具类插件,可以在任意网页中嗅探获取视频链接等数据,可以一键获取需要的链接并自动保存.使用起来十分方便,打开需要下载文件的网站.就可以抓取该页面上包含的所有链 ...

  7. 浏览器安装为知笔记插件(chrome浏览器)

    1.下载并安装驱动    wiz.cn/zh-cn/downloads-webclipper.html 2.我选择的谷歌浏览器,这里选择手动安装 3. 下载会得到一个crx文件.注意这里按照官方文档去 ...

  8. 【Chrome浏览器】常用快捷键整理

    标签页和窗口快捷键 1.  Ctrl + n 打开新窗口 2.  Ctrl + t 打开新的标签页,并跳转到该标签页 3.  Ctrl + Shift + t 重新打开最后关闭的标签页,并跳转到该标签 ...

  9. 如何限制浏览器使用_论如何优雅地使用chrome 浏览器

    chrome 浏览器目前已经算得上是在浏览器市场独占鳌头了,就连它的最强对手IE也不得不低下头颅改用Chromium内核,这让chrome 浏览器更是没有对手了,但是你真的了解这个你时时刻刻都在用到的 ...

最新文章

  1. EPSON机器人SPLE+语言_简单实例
  2. 46. Permutations 排列数
  3. Django(part40)--如何走向404
  4. 2021CSP:游记
  5. RSS你会用了吗?答曰:不会
  6. JS实现的文章字符串中某个字符总个数统计在线小工具实例
  7. 【Cocos2d-X(2.x) 游戏开发系列之二】cocos2dx最新2.0.1版本跨平台整合NDK+Xcode编译到Android...
  8. 小米4刷CM13系统
  9. 没有信号无服务器,没有信号不用怕“音离”你身边的便携式基站
  10. 【技巧总结】string和char[]之前的相互转换(c_str()+strcpy+stringstream.str())
  11. 微星电脑win、ctrl等组合键时而失灵
  12. 【转】PIC单片机入门笔记(新手学PIC必看)——基于PIC16F886
  13. Vue.js的简单趋势图
  14. AWS韩小勇为创业者详细解读云服务商如何为他们提供服务
  15. 谷歌AI论文BERT双向编码器表征模型:机器阅读理解NLP基准11种最优(公号回复“谷歌BERT论文”下载彩标PDF论文)
  16. 三行代码搭建一个全能书籍系统(wiki)
  17. spring boot 微服务入门
  18. dell主板40针开机针脚_实测戴尔OptiPlex 790主板34针前置面板接口针脚接口定义
  19. 免费资源快来看 蓝桥杯单片机组历届省赛国赛题目解答(省一国二)
  20. python新手代码

热门文章

  1. Android FlowLayout流式布局
  2. 热门话题“30岁还没结婚你会考虑将就么?”数据告诉你,网友们都如何做出抉择
  3. exercise code 8
  4. 开源一个服务端游戏开发框架
  5. win8引导linux,win8+archlinux引导修复
  6. QuaggaJS在给定图像中定位条形码的工作原理
  7. 1.16 使用JTAppleCalendar制作漂亮的日历 [iOS开发中的神兵利器]
  8. 免费申请使用IBM Cloud Lite(轻量套餐) 详细教程指南
  9. Python数据分析:数据库索引如何提高效率?
  10. 长文本口语语义理解技术系列①:段落分割实践