homepage Welcome to WebmasterWorld Guest from 54.226.0.225
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
javascript syntax question
can this be done?
evanheld




msg:1485257
 2:44 pm on Nov 10, 2003 (gmt 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

 

mikegram




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

<script language="JavaScript" type="text/javascript">
<!--
var num = 3;
alert("the value is " + num);
// -->
</script>

evanheld




msg:1485259
 3:04 pm on Nov 10, 2003 (gmt 0)

Thanks!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved