Welcome visitor
* Login
* Register
It is currently July 19th, 2019, 6:32 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » JavaScript



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  declare a string variable
PostPosted: July 28th, 2009, 11:54 pm 

Posts: 48
what should i do to declare a string variable? i've tried using
var txt= mytxt;
alert(txt);

and i get

Quote:
Webpage error details

Message: 'mytext' is undefined
Line: 8
Char: 1
Code: 0


Top
 Profile  
 
  Re: declare a string variable
PostPosted: July 29th, 2009, 12:10 am 
User avatar

Posts: 79
you need to type the string inside quotation marks, either single or double.
var txt="your text";


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » JavaScript


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron