Error in CDATA

Hi, sorry for taking your time, but my script is not working, there is an error in CDATA, but not the problem, how can I fix it or do it in any other way?

var script = document.createElement('script');
script.type = "text/javascript";
script.innerHTML = (<><![CDATA[ my script ]]></>).toString();
script.innerHTML = '//<![CDATA[' + "\n\n" + '//]]>';

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.