lllvlllaxi
ISP
Hi. I'm beginner with JavaScript. I need to do the following:
<textarea example>
text1/tomy/text2/
text1/john/text2/
text1/dany/text2/
text1/mike/text2/
</textarea>
<Problem>
I need say:
"each line of textarea have 3 parts":
Part1[0]=text1/;
Part2[1]="whatever is on the second part"/;
Part3[2]=text2/;
</problem>
now write on textarea [1]+[0]+[2] for each line:
tomy/text1/text2/
john/text1/text2/
dany/text1/text2/
mike/text1/text2/
or "[0]+[2]+[1]":
text1/text2/tomy/
text1/text2/john/
text1/text2/dany/
text1/text2/mike/
or "[0]+[1]+[1]+[1]":
text1/tomy/tomy/tomy/
text1/john/john/john/
text1/dany/dany/dany/
text1/mike/mike/mike/
<textarea example>
text1/tomy/text2/
text1/john/text2/
text1/dany/text2/
text1/mike/text2/
</textarea>
<Problem>
I need say:
"each line of textarea have 3 parts":
Part1[0]=text1/;
Part2[1]="whatever is on the second part"/;
Part3[2]=text2/;
</problem>
now write on textarea [1]+[0]+[2] for each line:
tomy/text1/text2/
john/text1/text2/
dany/text1/text2/
mike/text1/text2/
or "[0]+[2]+[1]":
text1/text2/tomy/
text1/text2/john/
text1/text2/dany/
text1/text2/mike/
or "[0]+[1]+[1]+[1]":
text1/tomy/tomy/tomy/
text1/john/john/john/
text1/dany/dany/dany/
text1/mike/mike/mike/