Showing posts with label Js. Show all posts
Showing posts with label Js. Show all posts

Sunday, October 20, 2013

Age Counter Java script

The below script
counts how long you've lived, in
days+hours+minutes.
Directions: Step 1: Copy this into
the <head> tags:
COPY CODE:

Friday, October 18, 2013

HTML/xHTML, JS code Tester

<script type="text/javascript">
function preview()
{
var odiv=document.getElementById('outputdiv');
var idiv=document.getElementById('inputcode');
odiv.innerHTML=idiv.value;
}
</script>

Friday, June 21, 2013

Pikachu

Copy the following code into your <HEAD></HEAD> tags.

<!-- TWO STEPS TO INSTALL POKEMON:

  
1.  Copy the coding into the HEAD of your HTML document
  2.  Add the last code into the BODY of your HTML document  
-->


<
SCRIPT LANGUAGE="JavaScript">
<!-- 
Original:  Paul (Poke_Paul@hotmail.com) -->
<!-- 
Web Site:  http://www.angelfire.com/ak3/MewHiddenLair -->

<!-- Begin
now
=new Date;x=now.getTime() %32768;
function 
Random(min,max) {x=(1103515245*x+12345) % 32768;
return 
Math.floor(x*(max-min+1)/32768+min);
}

No Right Click

Copy the following code into your <HEAD></HEAD> tags.
JS Code:
<script language="JavaScript">
<!--

var 
message="Sorry, that function is disabled.\nThis Page Copyrighted and\nImages and Text protected!\nALL RIGHTS RESERVED";
// Don't edit below!
function click(e) {
if (
document.all) {
if (
event.button == 2) {alert(message);
return 
false;
}
}
if (
document.layers) {
if (
e.which == 3) {alert(message);
return 
false;
}
}
}`

“Go Back” Button

  1. Browsers already have "back" buttons, so you'd better have a darn good reason for needing to put one on your page!
  2.  
  3. Input button with inline JavaScript
  4. <input type="button" value="Go Back From Whence You Came!" onclick="history.back(-1)" />
  5.  
  6. This is totally obtrusive, but you could fix that by only appending this button through JavaScript.
  7.  
  8. PHP
  9.  
  10. If JavaScript isn't a possibility, you could use the HTTP_REFERER, sanitize it, and echo it out via PHP.

  11. <?php
  12. $url = htmlspecialchars($_SERVER['HTTP_REFERER']);
  13. echo "<a href='$url'>back</a>";
  14. ?>

Thursday, June 13, 2013

Your last visit on site script

  1. Your last visit on site script js script:
  2.  
  3. demo : http://adf.ly/Q5aax
  4.  
  5. visit this site  http://adf.ly/Q5aax  and copy this code:
  6.  
  7. <script type="text/javascript">
  8. function getCookie(c_name)
  9. {
  10. if(document.cookie.length>0)
  11. {
  12. c_start=document.cookie.indexOf(c_name + "=" );
  13. if (c_start!=-1)
  14. {
  15. c_start=c_start + c_name.length+1;
  16. c_end=document.cookie.indexOf(";",c_start);
  17. if (c_end==-1) c_end=document.cookie.length;
  18. return unescape(document.cookie.substring(c_start,c_end));
  19. }