简体   繁体   中英

Relative Links Not working on HTML page

There is an issue I am facing in HTML page.

I have included a javascript code in that page due to which ActiveX warning message is thrown each time the HTML page is uploaded on local system.

To stop this warning being shown to the users, I have used MOTW (Mark of the Web) and included this code snippet at the top of the HTML Page:

<!-- saved from url=(0016)http://localhost-->

This line of code prohibits the warning prompt message.

But now the relative URLs on the page have stopped working.

Please help me find me a solution so that neither the ActiveX warning arises nor the relative links on the page should stop working.

Thanks in advance.

The ActiveX warnings should only arise when you are accessing your site from the local file system, for security reasons. When you access it through a (local or remote) web server the warnings should be gone.

Can you not use Apache (included in XAMPP ), or something similar, to serve your pages (even locally, through http://localhost/ )?

Edit:

Alternatively, you could disable that particular security setting in Internet Explorer (which I assume you use, because you mention ActiveX). Or you could try a different browser: Firefox, for example, does not have these restrictions.

您是否尝试过使用<base href="ENETERBASEURLHERE" />

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