0

currently, I try to execute this js function in my xhtml page:

<script type="text/javascript">
    function makeLayer(id, L, T, W, H, bgColor, visible, zIndex) {
                console.debug("inside");

                    var toto = new Array();
                    var res2 ="";

                    toto.push('<div id="container"> hello world </div>');
                    res2 = toto.join();
                    console.debug(res2);
                }
            }
    </script>

but in web console I see that: Uncaught SyntaxError: Unexpected token ILLEGAL, and this error corresponding at toto.push('<div id="container"> hello world </div>');

How I can to fix this error ?

pi-2r
  • 1,259
  • 4
  • 27
  • 52

0 Answers0