Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
JavierBootcamp
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
Javier Ferreira
JavierBootcamp
Commits
1da61ee1
Commit
1da61ee1
authored
Nov 01, 2021
by
Javier Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parent
46ea86b3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
Dia6/Trigger.docx
+0
-0
Dia6/ejercicio3dom.html
+52
-0
No files found.
Dia6/Trigger.docx
0 → 100644
View file @
1da61ee1
File added
Dia6/ejercicio3dom.html
0 → 100644
View file @
1da61ee1
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Ejercicio 3
</title>
<style>
.errormsg
{
color
:
red
;
display
:
none
;
}
</style>
</head>
<body>
<form
action=
"mailto:me@fakeemail.com"
id=
"formx"
>
<fieldset>
<legend>
Personal details
</legend>
<p>
<label>
Full name:
<input
type=
"text"
name=
"fullname"
id=
"fullname"
>
</label>
</p>
<p
class=
"errormsg"
id=
"nameerrormsg"
>
Ingrese su nombre
</p>
<p>
<label>
Street Address:
<input
type=
"text"
name=
"streetaddr"
id=
"streetaddr"
>
</label>
</p>
<p
class=
"errormsg"
id=
"addrerrormsg"
>
Ingrese su direccion
</p>
</fieldset>
<input
type=
"submit"
value=
"Submit it!"
>
</form>
</body>
<script>
document
.
querySelector
(
'#formx'
).
addEventListener
(
'submit'
,
()
=>
{
const
nameError
=
document
.
querySelector
(
'#nameerrormsg'
);
const
streetError
=
document
.
querySelector
(
'#addrerrormsg'
);
if
(
document
.
querySelector
(
'#fullname'
).
value
===
""
){
nameError
.
style
.
display
=
'block'
;
}
else
{
nameError
.
style
.
display
=
'none'
;
}
if
(
document
.
querySelector
(
'#streetaddr'
).
value
===
""
){
streetError
.
style
.
display
=
'block'
;
}
else
{
streetError
.
style
.
display
=
'none'
;
}
});
</script>
</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