How to Leave an HTML Code Running on Any Computer by Pen Drive

Asked

Viewed 314 times

1

I wanted to know how to program hyperlink and IMG src inside a Pen drive to be able to open on other computers just running inside the Pen drive itself.

  • 3

    Hello John! You can put the HTML you have and report what problems you have when using it from a pen?

  • 1

    So Sergio my goal is not a program itself but, I have a problem programming at home and in a presentation on a different computer all my codes are with hyperlink and image paths as default (c:/user/John/desktop) and when I pass by Pen drive nothing else works.

  • 3

    You need to use relative paths. If you put part of the HTML in the question as an example we can help how you should change it.

  • 2

    Click [Edit] to add information and we can then help format.

  • @I answered, then I saw if it worked.

1 answer

1


Solving Problem

You have to use relative path, today you must be using on your link path similar to this:

<script src="c:/usuário/João/desktop"></script>

Where you put all the file path, if you use relative paths:

 <a href="desktop/menu2.html">menu2</a>

He would follow the path of the page adding the rest.

Talking a little more about Relative and Absolute Path

The absolute address is the information for the location of the resource independently of the current page (protocol + domain + path). The relative address is information for the location of the resource from the current page.

absolute:

"http://www.nce.ufrj.br/cursos/inscricao.htm"

relative:

"inscricao.htm"

Source: http://www.nce.ufrj.br/ginape/cursohtml/conteudo/ligacoes/absrel.htm

  • Thank you very much Luiz. :)

  • did it work? did you understand the logic? If yes, mark as solved by checking below the answer rate :), to show other users that this is the @Joãosimões solution

Browser other questions tagged

You are not signed in. Login or sign up in order to post.