FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaScript-Learning/examples/dynamic-script-elements.html at master · xiazhe/JavaScript-Learning · GitHub
xiazhe
/
JavaScript-Learning
Public
Notifications
You must be signed in to change notification settings
Fork
3
Star
4
Code
Issues
0
Pull requests
1
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaScript-Learning
/
examples
/
dynamic-script-elements.html
Copy path
More file actions
More file actions
Latest commit
History
History
History
48 lines (40 loc) · 1.3 KB
Breadcrumbs
JavaScript-Learning
/
examples
/
dynamic-script-elements.html
Copy path
File metadata and controls
48 lines (40 loc) · 1.3 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html
>
<
html
>
<
head
>
<
meta
http-equiv
="
Content-Type
"
content
="
text/html; charset=utf-8
"
/>
<
title
>
</
title
>
<
meta
charset
="
utf-8
"
/>
<
script
>
var
script
=
document
.
createElement
(
"script"
)
script
.
type
=
"text/javascript"
;
//Firefox, Opera, Chrome, Safari 3+, IE 9+ support
//script.onload = function () {
// console.log("Script loaded!");
//};
//IE 8-
//script.onreadystatechange = function () {
// if (script.readyState == "loaded" || script.readyState == "complete") {
// script.onreadystatechange = null;
// alert("Script loaded.");
// }
//};
//IE
if
(
script
.
readyState
)
{
script
.
onreadystatechange
=
function
(
)
{
if
(
script
.
readyState
==
"loaded"
||
script
.
readyState
==
"complete"
)
{
script
.
onreadystatechange
=
null
;
console
.
log
(
"IE: Script loaded!"
)
;
}
}
;
}
else
{
script
.
onload
=
function
(
)
{
console
.
log
(
"Script loaded!"
)
;
}
;
}
script
.
src
=
"console.js"
;
document
.
getElementsByTagName
(
"head"
)
[
0
]
.
appendChild
(
script
)
;
</
script
>
</
head
>
<
body
>
</
body
>
</
html
>
Back
|
FazBrowse Home
|
New Git URL