Link to home
Start Free TrialLog in
Avatar of optical
optical

asked on

DHTML JSCRIPT string selection

How does the following code "ChangeMe()" select strings? First the first string then the second when the client clicks their mouse ? There's no i++ index to tell the JScript is it just a sequential order....

//////////////// CODE /////////////////////////
<HEAD><TITLE>Welcome!</TITLE>
<SCRIPT LANGUAGE="JScript">
function changeMe() {
    document.all.MyHeading.style.color = "green";
    document.all.MyText.innerText = "You can do the most amazing things with the least bit of effort.";
}
</SCRIPT>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso8859-1">
<META NAME="MS.LOCALE" CONTENT="EN-US">
<META NAME="ROBOTS" CONTENT="all">
</HEAD>
<BODY TOPMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF" LINK="#000000" VLINK="#808080" ALINK="#000000" onclick="changeMe()">

<H3 ID=MyHeading>Welcome to Dynamic HTML!</H3>
<P ID=MyText>Click anywhere in this document.</P>
</BODY>
////////////// END ////////////////////////

ASKER CERTIFIED SOLUTION
Avatar of rajgn
rajgn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial