...

View Full Version : please help to my code !!



lala138
05-05-2004, 01:31 AM
I am a new user for learning Javascript, i have the problem when i do my exercise. Question :

Suppose that count is a JavaScript variable and that its value is the number of people who have accessed the current web page. Write a single line of JavaScript code that uses a JavaScript alert to say:

The number of people who have already visited this page is X

where X is whatever value count currently has. Thus if the value of count is 4152, the alert would say

The number of people who have already visited this page is 4152

My code :

<!-- hide script from old browsers
var count;
count=4152;
alert("The number of people who have already visited this page is " + count);
//-->


The result is :

Logic or Runtime Errors

Our Analysis Of Your Code:

Do not change the count variable.

It stoped me to do the next exercise, please hple me to make the correction of my code. Thanks a lot.

Unit
05-05-2004, 01:37 AM
Write a single line of JavaScript code that uses a JavaScript alert to say

maybe just write


alert("The number of people who have already visited this page is " + count);

lala138
05-05-2004, 02:37 AM
maybe just write


alert("The number of people who have already visited this page is " + count);


Whao..... :eek: :eek: you are the excellent person, i asked so many people about the question, and nobody can point it out. Thank you so very much.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum