Advance Javascript

New JavaScript & jQuery Tutorials part 17 of 25 (Hindi & Urdu) Date Objects

<html>
<head>
 <title>Javascript Date Objects</title>
</head>
<body>
<script>
date=  new Date();
day= date.getDate();
month= date.getMonth()+1;
year== date.getFullYear();

document.write("Today's date is: "+"   <b> "+day+" -"+month+"-"+year+"</b>");
</script>
</body>
</html>


New JavaScript & jQuery Tutorials part 18 of 25 (Hindi & Urdu) Clock in JavaScript



<html>
<head>
 <title>Javascript Date Objects</title>
</head>
<body>
<script>
date=  new Date();
day= date.getDate();
month= date.getMonth()+1;
year== date.getFullYear();

document.write("Today's date is: "+"   <b> "+day+" -"+month+"-"+year+"</b>");
</script>
<script>


if (mins<10){
mins="0"+mins;
}
if (sec<10){
sec="0"+sec;
}
if (hours<12){
 sort="AM";
}
else {sort="PM";}


if (hours>12) {
hours=hours-12;
}
time= new Date();
hours=time.getHours();
mins=time.getMinutes();
sec=time.getSeconds();
document.write(" Current Time is: <b>"+hours+":"+mins+":"+sec+" "sort+" </b>");
</script>


</body>
</html>


New JavaScript & jQuery Tutorials part 19 of 25 (Hindi & Urdu) Window Objects



<html>
<head>
 <title>Javascript Date Objects</title>
</head>
<body>
<script>
window.location="http://www.google.com";
</script>
<script>
document.write(location.href+"<br>");
document.write(location.pathname+"<br>");
document.write(location.hostname+"<br>");
document.write(screen.width,height"<br>");
document.write(screen.height"<br>");
</script>
<script>
function myfun() {
jan=window.open(" http://www.socialjersey.com"," ","width=300,height=300 ");

}
function myfun1() {
jan.close(" "," ","width=300,height=300 ");

}
function myfun2() {
window.history.back();

}
</script>
<button onclick="myfun()">Open a Window</button>
<button onclick="myfun1()">Close this  Window</button>
<button onclick="myfun2()">Go Back</button>
</body>
</html>