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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
11 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>
...
...
Please
register
or
login
to post a comment