Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BootcampWebDia6
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cesar Giulano Gonzalez Maqueda
BootcampWebDia6
Commits
b214e436
Commit
b214e436
authored
Oct 22, 2021
by
Cesar Giulano Gonzalez Maqueda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Js Ejercicio 1
parent
ab5f9944
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
src/JsDomEj1.html
+46
-0
No files found.
src/JsDomEj1.html
0 → 100644
View file @
b214e436
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<title>
JavaScript Challenges
</title>
<style>
#emailpara
{
display
:
none
;
}
</style>
</head>
<body>
<form
action=
""
>
<fieldset>
<legend>
Email subscriptions
</legend>
<p
id=
"Ross"
>
<label>
<input
type=
"checkbox"
name=
"subscribe"
id=
"subscribe"
>
Yes! I would like to receive all of your free candy!
</label>
</p>
<p
id=
"emailpara"
>
<label>
Email Address:
<input
type=
"text"
name=
"email"
id=
"email"
>
</label>
</p>
</fieldset>
</form>
<script>
const
checkVisible
=
document
.
querySelector
(
'#subscribe'
);
const
subscribre
=
document
.
querySelector
(
'#emailpara'
);
subscribre
.
style
.
backgroundColor
=
"blue"
;
const
toggleVisible
=
()
=>
{
const
div
=
document
.
querySelector
(
"#emailpara"
);
if
(
div
.
style
.
display
!==
"block"
)
{
div
.
style
.
display
=
"block"
;
}
else
{
alert
(
"Campos Ocultos"
)
div
.
style
.
display
=
"none"
;
}
}
checkVisible
.
addEventListener
(
'click'
,
toggleVisible
);
</script>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment