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

JSrcipt Tutorial
Lesson: 4

Sample Description:
R U a Good Man!

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




About Lesson 4:

The R U a Good Man! sample is a simple usage of condition phrases in JavaScript. If the text boxes value be 'OK' When you are clicking on the button, an alert says that you are a 'Good Man'!
If not another alert says that you are a 'Blue Man'!!!
Pay attention that the JavaScript is Case Sensetive.








Test the sample!

  
<HTML>
<HEAD>
<TITLE>
</TITLE>
</HEAD>
<SCRIPT language=javascript>
<!--
function salaam3() {
aa=text3.value;
if (aa=='OK') {
window.alert ('Hey you are a Good Man!')
}
else {
window.alert ('Never be a Blue Man!')
}
}
//-->
</SCRIPT>
<BODY bgcolor=white>
<INPUT id=button1 name=button1
type=button value=Button
LANGUAGE=javascript
onclick="return salaam3()">
<INPUT id=text3 name=text3 >
</BODY>
</HTML>


© 2000 by MixofTix Developers Network. All rights reserved.