Alert Box:

More info: JavaScript Alert

What time is It?? !!!!! :D

Click the button to display the date.

This free script provided by
JavaScript Kit

expr:class='"loading" + data:blog.mobileClass'>

Linggo, Marso 9, 2014

Variable

<html>
<head>
<body background="lep.gif">
<title> Variables</title>
</head>
<script>
var a=1*1;
var y=1*2;
var b=1*3;
var c=1*4;
var d=1*5;
var e=1*6;
var f=1*7;
var g=1*8;
var h=1*9;
var i=1*10;
document.write('this part is multiplied by 1'+"<br>")
document.write('1X1='+a+"<br>")
document.write('1X2='+y+"<br>")
document.write('1X3='+b+"<br>")
document.write('1X4='+c+"<br>")
document.write('1X5='+d+"<br>")
document.write('1X6='+e+"<br>")
document.write('1X7='+f+"<br>")
document.write('1X8='+g+"<br>")
document.write('1X9='+h+"<br>")
document.write('1X10='+i+"<br>")
var a=1*2;
var y=1*4;
var b=1*6;
var c=1*8;
var d=1*10;
var e=1*12;
var f=1*14;
var g=1*16;
var h=1*18;
var i=1*20;
document.write('this part is multiplied by 2'+"<br>")
document.write('2X1='+a+"<br>")
document.write('2X2='+y+"<br>")
document.write('2X3='+b+"<br>")
document.write('2X4='+c+"<br>")
document.write('2X5='+d+"<br>")
document.write('2X6='+e+"<br>")
document.write('2X7='+f+"<br>")
document.write('2X8='+g+"<br>")
document.write('2X9='+h+"<br>")
document.write('2X10='+i+"<br>")
var a=1*3;
var y=1*6;
var b=1*9;
var c=1*12;
var d=1*15;
var e=1*18;
var f=1*21;
var g=1*14;
var h=1*17;
var i=1*30;
document.write('this part is multiplied by 3'+"<br>")
document.write('3X1='+a+"<br>")
document.write('3X2='+y+"<br>")
document.write('3X3='+b+"<br>")
document.write('3X4='+c+"<br>")
document.write('3X5='+d+"<br>")
document.write('3X6='+e+"<br>")
document.write('3X7='+f+"<br>")
document.write('3X8='+g+"<br>")
document.write('3X9='+h+"<br>")
document.write('3X10='+i+"<br>")
var a=1*4;
var y=1*8;
var b=1*12;
var c=1*16;
var d=1*20;
var e=1*24;
var f=1*28;
var g=1*32;
var h=1*36;
var i=1*40;
document.write('this part is multiplied by 4'+"<br>")
document.write('4X1='+a+"<br>")
document.write('4X2='+y+"<br>")
document.write('4X3='+b+"<br>")
document.write('4X4='+c+"<br>")
document.write('4X5='+d+"<br>")
document.write('4X6='+e+"<br>")
document.write('4X7='+f+"<br>")
document.write('4X8='+g+"<br>")
document.write('4X9='+h+"<br>")
document.write('4X10='+i+"<br>")
var a=1*5;
var y=1*10;
var b=1*15;
var c=1*20;
var d=1*25;
var e=1*30;
var f=1*35;
var g=1*40;
var h=1*45;
var i=1*50;
document.write('this part is multiplied by 5'+"<br>")
document.write('5X1='+a+"<br>")
document.write('5X2='+y+"<br>")
document.write('5X3='+b+"<br>")
document.write('5X4='+c+"<br>")
document.write('5X5='+d+"<br>")
document.write('5X6='+e+"<br>")
document.write('5X7='+f+"<br>")
document.write('5X8='+g+"<br>")
document.write('5X9='+h+"<br>")
document.write('5X10='+i+"<br>")
var a=1*6;
var y=1*12;
var b=1*18;
var c=1*24;
var d=1*30;
var e=1*36;
var f=1*42;
var g=1*48;
var h=1*54;
var i=1*60;
document.write('this part is multiplied by 6'+"<br>")
document.write('6X1='+a+"<br>")
document.write('6X2='+y+"<br>")
document.write('6X3='+b+"<br>")
document.write('6X4='+c+"<br>")
document.write('6X5='+d+"<br>")
document.write('6X6='+e+"<br>")
document.write('6X7='+f+"<br>")
document.write('6X8='+g+"<br>")
document.write('6X9='+h+"<br>")
document.write('6X10='+i+"<br>")
var a=1*7;
var y=1*14;
var b=1*21;
var c=1*28;
var d=1*35;
var e=1*42;
var f=1*49;
var g=1*56;
var h=1*63;
var i=1*70;
document.write('this part is multiplied by 7'+"<br>")
document.write('7X1='+a+"<br>")
document.write('7X2='+y+"<br>")
document.write('7X3='+b+"<br>")
document.write('7X4='+c+"<br>")
document.write('7X5='+d+"<br>")
document.write('7X6='+e+"<br>")
document.write('7X7='+f+"<br>")
document.write('7X8='+g+"<br>")
document.write('7X9='+h+"<br>")
document.write('7X10='+i+"<br>")
var a=1*8;
var y=1*16;
var b=1*24;
var c=1*32;
var d=1*40;
var e=1*48;
var f=1*56;
var g=1*64;
var h=1*72;
var i=1*80;
document.write('this part is multiplied by 8'+"<br>")
document.write('8X1='+a+"<br>")
document.write('8X2='+y+"<br>")
document.write('8X3='+b+"<br>")
document.write('8X4='+c+"<br>")
document.write('8X5='+d+"<br>")
document.write('8X6='+e+"<br>")
document.write('8X7='+f+"<br>")
document.write('8X8='+g+"<br>")
document.write('8X9='+h+"<br>")
document.write('8X10='+i+"<br>")
var a=1*9;
var y=1*18;
var b=1*27;
var c=1*36;
var d=1*45;
var e=1*54;
var f=1*63;
var g=1*72;
var h=1*81;
var i=1*90;
document.write('this part is multiplied by 9'+"<br>")
document.write('9X1='+a+"<br>")
document.write('9X2='+y+"<br>")
document.write('9X3='+b+"<br>")
document.write('9X4='+c+"<br>")
document.write('9X5='+d+"<br>")
document.write('9X6='+e+"<br>")
document.write('9X7='+f+"<br>")
document.write('9X8='+g+"<br>")
document.write('9X9='+h+"<br>")
document.write('9X10='+i+"<br>")
var a=1*10;
var y=1*20;
var b=1*30;
var c=1*40;
var d=1*50;
var e=1*60;
var f=1*70;
var g=1*80;
var h=1*90;
var i=1*100;
document.write('this part is multiplied by 10'+"<br>")
document.write('10X1='+a+"<br>")
document.write('10X2='+y+"<br>")
document.write('10X3='+b+"<br>")
document.write('10X4='+c+"<br>")
document.write('10X5='+d+"<br>")
document.write('10X6='+e+"<br>")
document.write('10X7='+f+"<br>")
document.write('10X8='+g+"<br>")
document.write('10X9='+h+"<br>")
document.write('10X10='+i+"<br>")

</script>
</html>

MP1_Maliwat_23

<html>
<body background="moon.jpg">
<h1>My First JavaScript</h1>
<p id="demo">
About My Life
</p>
<script>
function mylife()
{
x=document.getElementById("demo");  // Find the element
x.innerHTML="My name is Ryan Russel M.Maliwat, I lived in Brgy.Maliwalo Tarlac City, My favorite colors are Blue and Black.!";    // Change the content
}
function myFunction()
{
x=document.getElementById("demo");  // Find the element
x.innerHTML="My Parents are Karen and Joel Maliwat!!";    // Change the content
}
function myFriends()
{
x=document.getElementById("demo");  // Find the element
x.innerHTML="My friends are Tope, Josh , Mico, archer and many more!!";    // Change the content
}
function myclassmates()
{
x=document.getElementById("demo");  // Find the element
x.innerHTML="My classmates are so many and I can't mention them in here XD!";    // Change the content
}
</script>

<button type="button" onclick="mylife()">My Auto Biography!</button>
<button type="button" onclick="myFunction()">My Parents!</button>
<button type="button" onclick="myFriends()">My friends!</button>
<button type="button" onclick="myclassmates()">My classmates!</button>


</body>
</html>

Greetings 2

<html>
<body background="egg.gif">
<p> Click the button to get a time-based greeting.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction()
{
var x="";
var time=new Date().getHours();
if(time<11)
x="Good morning its eleven in the morning";
}
else if(time<20)
{
x="Good day";
}
else
{
x="Good evening";
}
document.getElementById("demo").innerHHTML=x;
}
</script>
</body>
</html>

Greetings1

<html>
<body background="moon.jpg">
<p>Click the button to get a "Good Day" greeting if the time is less than 20:00.</p>
<button onclick="myFunction()">
Try it </button>
<p id="demo"></p>
<script>
function myFunction()
{
var x"";
var time=newDate().gethours();if(time<20)
{
x="Good day";
}
document.get ElementbyId("demo").
inner HTML=x;
}
</script>
</body>
</html>
Alert_23 Code


<html>
<body background="tabletennis.gif">
<font color="green">
<h1>My First JavaScript</h1>
<font color="orange">
<p id="demo">
<font color="red">
About My Classmates
</p>
<script>
function classmate1()
{
x=document.getElementById("demo");  // Find the element
x.innerHTML="My First Classmate is Joshua he is from San Manuel Tarlac City, he is good at basketball.!";    // Change the content
}
function classmate2()
{
x=document.getElementById("demo");  // Find the element
x.innerHTML="My second classmate is Tope he is very good and he have many Chicks XD!!";    // Change the content
}
function classmate3()
{
x=document.getElementById("demo");  // Find the element
x.innerHTML="My third classmate is Miggy he is fond at playing computer games!!";    // Change the content
}
function classmate4()
{
x=document.getElementById("demo");  // Find the element
x.innerHTML="My fourth classmate is Justin Sangalang his father is a Colonel and he likes playing Basketball.!";    // Change the content
}
function classmate5()
{
x=document.getElementById("demo");  // Find the element
x.innerHTML="My Fifth classmate is Toti he is a shooter in three in playing basketball, and he is kind too.!";    // Change the content        
}
function classmate6()
{
x=document.getElementById("demo");  // Find the element
x.innerHTML="My Sixth classmate is Rommel he is good at playing DoTa and he is kind too!";    // Change the content
}
function classmate7()
{
x=document.getElementById("demo");  // Find the element
x.innerHTML="My seventh classmate is James Romero he is good at playing football and he is good at computer games too!";    // Change the content
}
function classmate8()
{
x=document.getElementById("demo");  // Find the element
x.innerHTML="Jared Ganal is a Nba 2k14 master he had many shoes like the kd 6!";    // Change the content
}
function classmate9()
{
x=document.getElementById("demo");  // Find the element
x.innerHTML="Kim is good basketball player he is good at playing computer games!";    // Change the content
}
function classmate10()
{
x=document.getElementById("demo");  // Find the element
x.innerHTML="My last Classmate is Yvan Borra he is kind,good at studies and good at playing basketball too.!";    // Change the content
}
function reset()
{
x=document.getElementById("demo");  // Find the element
x.innerHTML="About My Classmates";    // Change the content
}
</script>

<button type="button" onclick="alert('Joshua Flores'), classmate1()">classmate1!</button>
<button type="button" onclick="alert('Tope Castaneda'), classmate2()">classmate2!</button>
<button type="button" onclick="alert('Miggy Maglalang'), classmate3()">classmate3!</button>
<button type="button" onclick="alert('Justin Sangalang'), classmate4()">classmate4!</button>
<button type="button" onclick="alert('Toti Vistro'), classmate5()">classmate5!</button>
<button type="button" onclick="alert('Rommel Sindayen'), classmate6()">classmate6!</button>
<button type="button" onclick="alert('James Romero'), classmate7()">classmate7!</button>
<button type="button" onclick="alert('Jared Ganal'), classmate8()">classmate8!</button>
<button type="button" onclick="alert('Kim Encarnacion'), classmate9()">classmate9!</button>
<button type="button" onclick="alert('Yvan Allen Borra'), classmate10()">classmate10!</button>
<button type="button" onclick="reset()">Reset!</button><br>
</br>
</font>
</body>
</html>

Sabado, Marso 1, 2014


<html>
<body>
<p> Click the button to get a time-based greeting. </ p>
<button onclick="myFunction()"> Try it </ button>
<p id="demo"> </ p>
<script>
function myFunction ()
{
var x = "";
var time = new Date (). getHours ();
if (time <11)
X = "Good Morning its eleven in the morning";
}
else if (time <20)
{
x = "Good Day";
}
else
{
x = "Good evening
}
document.getElementById ("demo"). innerHTML = x;
}
</ Script>
</ Body>
</ Html>