- Browsers already have "back" buttons, so you'd better have a darn good reason for needing to put one on your page!
- Input button with inline JavaScript
- <input type="button" value="Go Back From Whence You Came!" onclick="history.back(-1)" />
- This is totally obtrusive, but you could fix that by only appending this button through JavaScript.
- PHP
- If JavaScript isn't a possibility, you could use the HTTP_REFERER, sanitize it, and echo it out via PHP.
- <?php
- $url = htmlspecialchars($_SERVER['HTTP_REFERER']);
- echo "<a href='$url'>back</a>";
- ?>
Showing posts with label Scripts. Show all posts
Showing posts with label Scripts. Show all posts
Friday, June 21, 2013
“Go Back” Button
Thursday, June 13, 2013
Your last visit on site script
- Your last visit on site script js script:
- demo : http://adf.ly/Q5aax
- visit this site http://adf.ly/Q5aax and copy this code:
- <script type="text/javascript">
- function getCookie(c_name)
- {
- if(document.cookie.length>0)
- {
- c_start=document.cookie.indexOf(c_name + "=" );
- if (c_start!=-1)
- {
- c_start=c_start + c_name.length+1;
- c_end=document.cookie.indexOf(";",c_start);
- if (c_end==-1) c_end=document.cookie.length;
- return unescape(document.cookie.substring(c_start,c_end));
- }
Subscribe to:
Posts (Atom)