Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Javascript and I have different ideas about what "concatenate" means.
- Date: Thu, 16 Dec 2010 01:52:57 +0900
- From: Ruben Dorado <ruben.dorados@example.com>
- Subject: Re: [tlug] Javascript and I have different ideas about what "concatenate" means.
- References: <4D08CDD3.5020806@example.com> <AANLkTim1yQZmd+=2WBW3bZeFmggTwWP8u-bUaVjaaEB1@example.com>
Strange, I this is my code: <html> <head> <script> function display_result(){ output = ""; for (num=0;num<2;num++) { output = output.concat('<div id="1">\n<div id="2">\n<div id="3">\n</div>\n</div>\n</div>\n'); } alert(output); } </script> </head> <body> <form onsubmit="display_result()"> <input type="checkbox" id="check"> <input type="submit" /> </form> </body> </html> And this is my result: <div id="1"> <div id="2"> <div id="3"> </div> </div> </div> <div id="1"> <div id="2"> <div id="3"> </div> </div> </div> Which is the supposed output. I used Firefox and Chrome to execute the script. Do you have previous definitions of output?
- Follow-Ups:
- References:
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Javascript and I have different ideas about what "concatenate" means.
- Next by Date: Re: [tlug] Javascript and I have different ideas about what "concatenate" means.
- Previous by thread: Re: [tlug] Javascript and I have different ideas about what "concatenate" means.
- Next by thread: Re: [tlug] Javascript and I have different ideas about what "concatenate" means.
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links