Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DrexelCHI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
maa458
DrexelCHI
Commits
31d1b069
Commit
31d1b069
authored
4 years ago
by
Manal Abbas
Browse files
Options
Downloads
Patches
Plain Diff
source code
parent
645fa008
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
IntroToJavaScript/src/index.html
+23
-0
23 additions, 0 deletions
IntroToJavaScript/src/index.html
IntroToJavaScript/src/script.js
+29
-0
29 additions, 0 deletions
IntroToJavaScript/src/script.js
IntroToJavaScript/src/style.css
+79
-0
79 additions, 0 deletions
IntroToJavaScript/src/style.css
with
131 additions
and
0 deletions
IntroToJavaScript/src/index.html
0 → 100644
+
23
−
0
View file @
31d1b069
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<link
rel=
"icon"
href=
"images/logo.png"
>
<link
rel=
"stylesheet"
href=
"style.css"
>
<title>
DrexelCHI
</title>
</head>
<body>
<div
class=
"main"
>
<div
class=
"screen"
id=
"screen"
></div>
<div
class=
"clear"
id=
"clear"
>
C
</div>
<ul
class=
"numbers"
>
<li>
7
</li><li>
8
</li><li>
9
</li><li>
÷
</li>
<li>
4
</li><li>
5
</li><li>
6
</li><li>
x
</li>
<li>
1
</li><li>
2
</li><li>
3
</li><li>
-
</li>
<li>
0
</li><li>
.
</li><li>
=
</li><li>
+
</li>
</ul>
</div>
<script
src=
"script.js"
></script>
</body>
</html>
This diff is collapsed.
Click to expand it.
IntroToJavaScript/src/script.js
0 → 100644
+
29
−
0
View file @
31d1b069
var
screen
=
document
.
getElementById
(
"
screen
"
);
var
clear
=
document
.
getElementById
(
"
clear
"
);
var
elements
=
document
.
getElementsByTagName
(
"
li
"
);
for
(
var
i
=
0
;
i
<
elements
.
length
;
i
++
)
{
if
(
elements
[
i
].
innerHTML
===
"
=
"
)
{
elements
[
i
].
onclick
=
function
()
{
screen
.
innerHTML
=
eval
(
screen
.
innerHTML
);
};
}
else
{
elements
[
i
].
onclick
=
updateScreen
(
i
);
}
}
clear
.
onclick
=
function
()
{
screen
.
innerHTML
=
''
;
};
function
updateScreen
(
i
)
{
return
function
()
{
if
(
elements
[
i
].
innerHTML
===
"
÷
"
)
{
screen
.
innerHTML
+=
"
/
"
;
}
else
if
(
elements
[
i
].
innerHTML
===
"
x
"
)
{
screen
.
innerHTML
+=
"
*
"
;
}
else
{
screen
.
innerHTML
+=
elements
[
i
].
innerHTML
;
}
};
}
This diff is collapsed.
Click to expand it.
IntroToJavaScript/src/style.css
0 → 100644
+
79
−
0
View file @
31d1b069
*
{
box-sizing
:
border-box
;
font
:
bold
14px
'Arial'
,
sans-serif
;
}
.main
{
width
:
278px
;
margin
:
17.5%
auto
;
background
:
#3F475B
;
height
:
310px
;
box-shadow
:
2px
2px
2px
rgb
(
128
,
128
,
128
);
padding
:
15px
;
border-bottom
:
5px
solid
#ED586C
;
border-radius
:
4px
;
position
:
relative
;
}
.screen
{
list-style
:
none
;
color
:
white
;
height
:
45px
;
margin-left
:
8px
;
border-radius
:
4px
;
border-top
:
4px
solid
#828A9B
;
text-align
:
center
;
margin-bottom
:
8px
;
width
:
182px
;
background
:
#828A9B
;
border-top
:
4px
solid
#ED586C
;
overflow
:
hidden
;
}
.clear
{
background
:
#7B8D8E
;
padding
:
10px
17px
;
position
:
absolute
;
border-radius
:
3px
;
left
:
215px
;
top
:
18px
;
color
:
white
;
cursor
:
pointer
;
text-align
:
center
;
}
.numbers
{
padding
:
0
;
margin
:
0
;
}
.numbers
li
{
list-style
:
none
;
float
:
left
;
width
:
52px
;
background
:
white
;
margin
:
9px
5px
;
padding
:
10px
;
border-bottom
:
4px
solid
#828A9B
;
border-radius
:
5px
;
color
:
#888888
;
text-align
:
center
;
cursor
:
pointer
;
}
.numbers
li
:hover
{
background
:
#44B3C2
;
border-bottom
:
4px
solid
#336699
;
color
:
white
;
}
.numbers
li
:nth-child
(
15
)
{
background
:
#F43341
;
color
:
white
;
}
.numbers
li
:nth-child
(
15
)
:hover
{
background
:
#FE5E6A
;
border-bottom
:
4px
solid
#B3232E
;
color
:
white
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment