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!</TIT LE>
<SCRIPT LANGUAGE="JScript">
function changeMe() {
document.all.MyHeading.sty le.color = "green";
document.all.MyText.innerT ext = "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 ////////////////////////
//////////////// CODE /////////////////////////
<HEAD><TITLE>Welcome!</TIT
<SCRIPT LANGUAGE="JScript">
function changeMe() {
document.all.MyHeading.sty
document.all.MyText.innerT
}
</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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.