Welcome to WebmasterWorld Guest from 54.160.254.203

Forum Moderators: open

Message Too Old, No Replies

javascript syntax question

can this be done?

     
2:44 pm on Nov 10, 2003 (gmt 0)

New User

10+ Year Member

joined:Nov 5, 2003
posts:15
votes: 0


Hello,

I'm trying to use the alert function in javascript to do some simple debugging. I am a novice at javascript, and I was wondering if you can insert values (integer and string) into the javascript alert function parameter.

e.g. alert("the value is " && [some integer value here]")

what would be the correct javascript syntax for this?

Thanks,
evanheld

2:59 pm on Nov 10, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 4, 2002
posts:60
votes: 0


<script language="JavaScript" type="text/javascript">
<!--
var num = 3;
alert("the value is " + num);
// -->
</script>
3:04 pm on Nov 10, 2003 (gmt 0)

New User

10+ Year Member

joined:Nov 5, 2003
posts:15
votes: 0


Thanks!