Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
MinsoftK
2020-04-17 00:53:41 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fc3a6005d5d945eecb74b648792a5d90e3be3793
fc3a6005
1 parent
089682cb
test for using tag
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
47 deletions
front/web/ex/Loopandfunction.html
front/web/ex/colors.js
front/web/ex/object.html
front/web/ex/usingobject.html
front/web/ex/Loopandfunction.html
View file @
fc3a600
...
...
@@ -14,6 +14,11 @@ function LinksSetColor(color){
i
+=
1
;
}
}
var
Body
=
{
setColor
:
function
(
color
){
}
}
function
bodySetColor
(
color
){
document
.
querySelector
(
'body'
).
style
.
color
=
color
;
}
...
...
front/web/ex/colors.js
0 → 100644
View file @
fc3a600
var
Links
=
{
SetColor
:
function
(
color
){
var
alist
=
document
.
querySelectorAll
(
'a'
);
var
i
=
0
;
while
(
i
<
alist
.
length
)
{
alist
[
i
].
style
.
color
=
color
;
i
+=
1
;
}
}
}
var
Body
=
{
SetColor
:
function
(
color
){
document
.
querySelector
(
'body'
).
style
.
color
=
color
;
},
SetBackGruondColor
:
function
(
color
){
document
.
querySelector
(
'body'
).
style
.
backgroundColor
=
color
;
}
}
function
nightDayHandler
(
self
){
if
(
self
.
value
===
'night'
)
{
Body
.
SetBackGruondColor
(
'black'
)
Body
.
SetColor
(
'white'
);
self
.
value
=
'day'
;
Links
.
SetColor
(
'white'
);
}
else
{
Body
.
SetBackGruondColor
(
'white'
)
Body
.
SetColor
(
'black'
);
self
.
value
=
'night'
;
Links
.
SetColor
(
'blue'
);
}
}
front/web/ex/object.html
View file @
fc3a600
...
...
@@ -20,11 +20,15 @@
</script>
<h2>
iterate
</h2>
<script>
for
(
var
key
in
coworkers
){
document
.
write
(
key
+
' : '
+
coworkers
[
key
]
+
'<br>'
);
}
</script>
<h2>
property
&
method
</h2>
<script>
coworker
.
showAll
=
function
(){
for
(
var
key
in
this
){
document
.
write
(
key
+
' : '
+
this
[
key
]
+
'<br>'
);
}
}
coworkers
.
showAll
();
</script>
</body>
</html>
...
...
front/web/ex/usingobject.html
View file @
fc3a600
...
...
@@ -4,53 +4,12 @@
<title>
KHU KHU Chat
</title>
<meta
charset=
"utf-8"
>
<link
rel=
"stylesheet"
href=
"style.css"
>
<script>
var
Links
=
{
SetColor
:
function
(
color
){
var
alist
=
document
.
querySelectorAll
(
'a'
);
var
i
=
0
;
while
(
i
<
alist
.
length
)
{
alist
[
i
].
style
.
color
=
color
;
i
+=
1
;
}
}
}
var
Body
=
{
SetColor
:
function
(
color
){
document
.
querySelector
(
'body'
).
style
.
color
=
color
;
},
SetBackGruondColor
:
function
(
color
){
document
.
querySelector
(
'body'
).
style
.
backgroundColor
=
color
;
}
}
function
nightDayHandler
(
self
){
if
(
self
.
value
===
'night'
)
{
Body
.
SetBackGruondColor
(
'black'
)
Body
.
SetColor
(
'white'
);
self
.
value
=
'day'
;
Links
.
SetColor
(
'powderblue'
);
}
else
{
Body
.
SetBackGruondColor
(
'white'
)
Body
.
SetColor
(
'black'
);
self
.
value
=
'night'
;
Links
.
SetColor
(
'blue'
);
}
}
</script>
<script
src=
"colors.js"
></script>
</head>
<body>
<input
id=
"night_day"
type=
"button"
value=
"night"
onclick=
"
nightDayHandler(this);
"
>
<!-- button2 making and using function -->
<input
id=
"night_day"
type=
"button"
value=
"night"
onclick=
"
nightDayHandler(this);
...
...
Please
register
or
login
to post a comment