简体   繁体   中英

<a href=“”> not working in IE but does in chrome

So I am trying to get the this HTML page to work, its in CSS & HTM L. When I try to click the "a href="link here" it doesn't work however if I open the window in Chrome vs. IE it works fine. Any idea as to why? The code is below for the HTML I can post the CSS if needed. The links below are not the actual links. The real links are going to a file on my pc/share drive. I am trying to load an HTA which is why it needs done in IE not chrome and no hrefs will work in IE with this for some reason no matter if its a https:// or anything it jsut doesn't work in IE.

 var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-7243260-2']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); 
 <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.js"></script> <div class="container"> <header> <h1><img src="logo.png" width="500" height="180"></h1> </header> <div class="component"> <h2>Downtime</h2> <!-- Start Nav Structure --> <button class="cn-button" id="cn-button">Menu</button> <div class="cn-wrapper" id="cn-wrapper"> <ul> <li><a href="C:\\Program Files (x86)\\Futuremark\\SystemInfo" target="_blank"><span>Click Me</span></a></li> </ul> </div> <!-- End of Nav Structure --> </div> <section> <h1> <center>About</center> </h1> <p>Cool text here guys :) <br> <br> Even cooler text :). </P> </section> </div> 

<a href="c:\Program Files (x86)\Futuremark\SystemInfo" target="_blank"><span>Click Me</span></a> 

is a folder uri. IE will ignore it to prevent just any website from accessing the local file system.(shell)... if an attacker gains access to your computers file system, then they gain access to other sensitive information.

IE used to allow

<iframe src="c:\"/>

but that has now been patched....

see the vendors website https://www.futuremark.com/ for advice on using their desktop application with web browsers... usually interaction between IE and a desktop application is done using an ActiveX control.. eg. Adobe PDF reader. Web pages then can use scripting to launch and interact with the desktop product. IE has security zones .... other browsers have per site security settings....

You could also use a browser extension in IE that would open the futuremark folders in a shell folder instead of in a browser frame. The software vendor may already have one that you can install in IE and chrome and FX.

you must add a http:// in your links
like this :

 <li><a href="http://google.com" target="_blank"><span>Google</span></a></li> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM