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-16 17:11:36 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fc14fbe371b31794dd8c4d6b68b07f6c11d56ad5
fc14fbe3
1 parent
1dbe077d
save tag about array
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
7 deletions
front/web/ex/js.html
front/web/ex/js.html
View file @
fc14fbe
...
...
@@ -14,20 +14,79 @@
<h1><a
href=
"main.html"
color:black
>
KHU Chatting service
</a></h1>
<img
src=
"image/signin.jpg"
class=
"image"
>
<!--refactoring and conditional statement -->
<input
id=
"night_day"
type=
"button"
value=
"night"
onclick=
"
if(document.querySelector('
body').style.backgroundColor==='black
')
if(document.querySelector('
#night_day').value==='night
')
{
document.querySelector('body').style.backgroundColor= 'white';
document.querySelector('body').style.color= 'black';
document.querySelector('#night_day').value= 'night';
var target=document.querySelector('body');
target.style.backgroundColor= 'black';
target.style.color= 'white';
document.querySelector('#night_day').value= 'day';
}else{
target.style.backgroundColor= 'white';
target.style.color= 'black';
document.querySelector('#night_day').value= 'night';
}
"
>
<!-- about this grammer
<input type="button" value="night" onclick="
if(this.value==='night')
{
document.querySelector('body').style.backgroundColor= 'black';
document.querySelector('body').style.color= 'white';
document.querySelector('#night_day').value= 'day';
this.value= 'day';
}else{
document.querySelector('body').style.backgroundColor= 'white';
document.querySelector('body').style.color= 'black';
this.value= 'night';
}
">
-->
<!-- about array
<script>
var cowokers=["minsing","minsoft"];
document.write(cowokers[0]);
document.write(cowokers[1]);
cowokers.push("ssssss")
document.write(cowokers);
</script>
-->
<!-- about Loop
<ul>
<script>
var i=0;
while(i<3)
{
document.write("<li>var</li>")
i+=1;
}
</script>
</ul>
-->
<!--Loop & Array -->
<script>
var
cowokers
=
[
"minsung"
,
"leezche"
,
"minsoft"
,
"sdy"
];
</script>
<script>
var
i
=
0
;
while
(
i
<
cowokers
.
length
){
document
.
write
(
'<li><a href="http://a.com/'
+
cowokers
[
i
]
+
'">'
+
cowokers
[
i
]
+
'</a></li>'
);
i
+=
1
;
}
</script>
<div
id=
"grid"
>
<ol>
...
...
Please
register
or
login
to post a comment