1582nu

xxxxxxxxxxxxx

Mar 26th, 2012
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. function getHour(url, year, month, day){
  3.     var xmlhttp;
  4.     if (window.XMLHttpRequest){ // code for IE7+, Firefox, Chrome, Opera, Safari   
  5.         xmlhttp=new XMLHttpRequest();
  6.     }
  7.     else{ // code for IE6, IE5
  8.         xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  9.     }
  10.     xmlhttp.onreadystatechange=function(){
  11.         if (xmlhttp.readyState==4 && xmlhttp.status==200){
  12.             document.getElementById("orar").innerHTML=xmlhttp.responseText; // aici e raspunsul request-ului
  13.         }
  14.     }
  15.         xmlhttp.open("GET","+url+"?y="+year+"&m="+month+"&day="+day;
  16.     xmlhttp.send();
  17. }
  18. </script>
  19.  
  20. <a class="day" onclick="getHour('orar.php', '2012', '03', '26')" style="cursor:pointer;hand">26</a>
Advertisement
Add Comment
Please, Sign In to add comment