<script> alert(1); window.onload = function () { var str = '<script>alert(2)</sc' +'ript> '; document.write(str); } alert(3); </script>