JavaScript Tutorial
I dedicate this Tutorial to you, dear friends, all around the world. by_ Shahin Noursalehi
<Prev.  (Main)  Next>

JSrcipt Tutorial
Lesson: 5

Sample Description:
I love...!

User Level:
1.New
2.Casual
3.Accomplished
4.Expert




About Lesson 5:

The I love...! sample makes you ready to use proffesional usages of JavaScript. And again, when you are clicking on the button, the sentence 'I love JavaScript' changes to 'JavaScript is realy Hard?'. I suppose that, the combination of this capability with 'If' phrases, could be so powerful!
But there is a question yet!
JavaScript is realty hard???!








Test the sample!

  

I love Java Script!

<HTML>
<HEAD>
<TITLE>
</TITLE>
</HEAD>
<SCRIPT language=javascript>
<!--
function salaam4() {
if (First.innerText == 'I love Java Script!'){
First.innerHTML ='<b><i>Java Script</i></b> is realy Hard?!';
}
else
{
First.innerHTML ='I love <b><i>Java Script!</i></b>';
}
}
//-->
</SCRIPT>
<BODY bgcolor=white>
<INPUT id=button1 name=button1
type=button value=Button
LANGUAGE=javascript
onclick="return salaam4()">
<p id="First"> I love <b>Java</b> Script!</p>
</BODY>
</HTML>


© 2000 by MixofTix Developers Network. All rights reserved.