<script> if (window.location.pathname == "1.html") { <script type="text/javascript" src="file.js"></script> - как-то так можно? } else { document.write("Hellow"); } </script>
if (window.location.pathname == "1.html") { var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'abc.js'; document.getElementsByTagName('head')[0].appendChild(script); } else { document.write("hellow"); }