0

How will check your external javascript is link to your html

external JavaScript

18th Jan 2017, 8:31 PM
stich
2 ответов
+ 8
window.onload=function(){var source = "source";if(document.documentElement.outerHTML.match(source)){alert(true);}}; (check if it's linked)
18th Jan 2017, 8:39 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 1
to link an external JS file use <script src="path"></script> inside the <body> tag and before you use any of the JS functions in it
18th Jan 2017, 8:37 PM
Andreas K
Andreas K - avatar