página anterior

17/06/2004 - 02:15 por juan ramón | Informe spam
cómo le hago para que una liga me lleve a la página que
visité anteriormente.

Preguntas similare

Leer las respuestas

#1 Jorge Oblitas
18/06/2004 - 08:38 | Informe spam
trabaja con el history usando scripts.

usas window.history.back para la anteror y peudes usar nuemeros para ir a
dos anteriores, tres anteriores, etc.

Jorge Oblitas

"juan ramón" wrote in message
news:1d39e01c45400$21705680$
cómo le hago para que una liga me lleve a la página que
visité anteriormente.
Respuesta Responder a este mensaje
#2 Ricard Teixidó
30/06/2004 - 23:37 | Informe spam
Espero que esto te sirva de ayuda

Well, you want to make a back button- but you want the button to take the
viewer back to the page they just came from, which may not have been one of
your pages. This kind of back button would act like the back button on a web
browser. Well, if you really want to have one, you can do it with a nifty
little javascript. Here it is:

<FORM>
<INPUT type="button" value="Click here to go back" onClick="history.back()">
</FORM>

This will place a button on your page that will send the user back to the
last page in their history list before yours. To try it out, click the link
below and see the button on the new page.

Example Page

And when you clicked the button, you ended up back here. You can try going
to the example page from elsewhere..you'll just be sent back there when
you click the button

So, what does all of that code mean? Okay, here's the scoop:


1.. <FORM>
This opens a form so we can use the button on the page.

2.. <INPUT type="button" value="Click here to go back".
This creates the button we use for the script.

3.. onClick="history.back()">
This is what makes everything happen. The onClick=" " tells the browser to
do the command in the quotes when the button is clicked. The history.back()
is the function that does just what it says: It takes the viewer on step
back in their history list.
Is there more? ..I thought you'd never ask..

Okay, you can swap out the history.back() function above with one of the
following to do some different things:


1.. history.forward()
This will take the viewer one step forward in their history list.

2.. history.go(-1) or history.go(1)
This allows you to determine how far forward or back to take the viewer.
Use a minus sign and a number to go back, or just a number to go forward.
Try really confusing somebody by using -7 or 12 or something. I sure would
wonder what happened if I ended up seven pages back from where I was!

"juan ramón" escribió en el mensaje
news:1d39e01c45400$21705680$
cómo le hago para que una liga me lleve a la página que
visité anteriormente.
email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida