Es funktioniert alles!!!! sagt Koebi!
Testfolie
<html>
<head>
<title>Test</title>
<script type="text/javascript">
var teststring= "ab"; // ziel aus a wird 01 aus b 02 etc.
// var aabb = {teststring.replace(/a/g, "01"), teststring.replace(/b/g, "02")} ;
// aus ab soll 0102 machen … erster schritt a ersetzen, result: 01b … speichern! o1b …
var ab1 = teststring.replace(/a/g, "01"); // + teststring.replace(/b/g, "02") ;
var ab2 = ab1.replace(/b/g, "02");
document.write("ab2 = " + ab2); // result: aabb = 01b a02
//document.write(aaa.replace(/01/g, "05") + aaa.replace(/01/g, "06"));
</script>
</head>
<body>
</body></html>
cod
<head>
<title>Test</title>
<script type="text/javascript">
var teststring= a
var x="5"
//x<20
var 1.schritt = teststring.replace(/a/g, "01");
teststring.replace(/b/g, "02");
teststring.replace(/c/g, "03");
teststring.replace(/d/g, "04");
teststring.replace(/e/g, "05");
teststring.replace(/f/g, "06");
teststring.replace(/g/g, "07");
teststring.replace(/h/g, "08");
teststring.replace(/i/g, "09");
teststring.replace(/j/g, "10");
teststring.replace(/k/g, "11");
teststring.replace(/l/g, "12");
teststring.replace(/m/g, "13");
teststring.replace(/n/g, "14");
teststring.replace(/o/g, "15");
teststring.replace(/p/g, "16");
teststring.replace(/q/g, "17");
teststring.replace(/r/g, "18");
teststring.replace(/s/g, "19");
teststring.replace(/t/g, "20");
teststring.replace(/u/g, "21");
teststring.replace(/v/g, "22");
teststring.replace(/x/g, "23");
teststring.replace(/y/g, "24");
teststring.replace(/z/g, "25");
document.write(teststring.replace(/01/g, "parseFloat('01+x')"));
document.write(teststring.replace(/02/g, "02+05"));
teststring.replace(/03/g, "03+x");
teststring.replace(/04/g, "04+x");
teststring.replace(/05/g, "05+x");
teststring.replace(/06/g, "06+x");
teststring.replace(/07/g, "07+x");
teststring.replace(/08/g, "08+x");
teststring.replace(/09/g, "09+x");
teststring.replace(/10/g, "10+x");
teststring.replace(/11/g, "11+x");
teststring.replace(/12/g, "12+x");
teststring.replace(/13/g, "13+x");
teststring.replace(/14/g, "14+x");
teststring.replace(/15/g, "15+x");
teststring.replace(/16/g, "16+x");
teststring.replace(/17/g, "17+x");
teststring.replace(/18/g, "18+x");
teststring.replace(/19/g, "19+x");
teststring.replace(/20/g, "20+x");
teststring.replace(/21/g, "21+x");
teststring.replace(/22/g, "22+x");
teststring.replace(/23/g, "23+x");
teststring.replace(/23/g, "23+x");
</script>
</head>
<body>
</body></html>