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 01:38:10 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c80794a6c77a9427b43b4d3f8f7c9c5da26434e8
c80794a6
1 parent
fc3a6005
test using jquery
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
14 deletions
front/web/ex/Loopandfunction.html
front/web/ex/colors.js
front/web/ex/usingobject.html
front/web/ex/Loopandfunction.html
View file @
c80794a
...
...
@@ -3,6 +3,7 @@
<head>
<title>
KHU KHU Chat
</title>
<meta
charset=
"utf-8"
>
<link
rel=
"stylesheet"
href=
"style.css"
>
<script>
function
LinksSetColor
(
color
){
...
...
front/web/ex/colors.js
View file @
c80794a
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 alist=document.querySelectorAll('a');
// var i =0;
// while(i<alist.length)
// {
// alist[i].style.color=color;
// i+=1;
// }
// }
$
(
'a'
).
css
(
'color'
,
color
);
//jquery 사용한 것.
}
}
var
Body
=
{
SetColor
:
function
(
color
){
document
.
querySelector
(
'body'
).
style
.
color
=
color
;
//document.querySelector('body').style.color= color;
$
(
'body'
).
css
(
'color'
,
color
);
},
SetBackGruondColor
:
function
(
color
){
document
.
querySelector
(
'body'
).
style
.
backgroundColor
=
color
;
//document.querySelector('body').style.backgroundColor= color;
$
(
'body'
).
css
(
'backgroundColor'
,
color
);
}
}
...
...
@@ -26,7 +30,7 @@ function nightDayHandler(self){
Body
.
SetColor
(
'white'
);
self
.
value
=
'day'
;
Links
.
SetColor
(
'
whit
e'
);
Links
.
SetColor
(
'
powderblu
e'
);
}
else
{
Body
.
SetBackGruondColor
(
'white'
)
...
...
front/web/ex/usingobject.html
View file @
c80794a
...
...
@@ -4,6 +4,10 @@
<title>
KHU KHU Chat
</title>
<meta
charset=
"utf-8"
>
<link
rel=
"stylesheet"
href=
"style.css"
>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"
>
//color.js 앞에 jquery 써줘야함
</script>
<script
src=
"colors.js"
></script>
</head>
<body>
...
...
@@ -11,9 +15,9 @@
nightDayHandler(this);
"
>
<!-- button2 making and using function -->
<input
id=
"night_day"
type=
"button"
value=
"night"
onclick=
"
<input
id=
"night_day"
type=
"button"
value=
"night"
onclick=
"
nightDayHandler(this);
"
>
"
>
<div
id=
"grid"
>
<ol>
...
...
Please
register
or
login
to post a comment