text
stringlengths
1
81
start
float64
0
10.1k
duration
float64
0
24.9
can also just provide the function
2,552.91
2.84
itself
2,554.98
4.01
I can say function and then in between
2,555.75
6.39
these curly braces I can specify exactly
2,558.99
5.82
what code should run when the form is
2,562.14
4.41
submitted by providing this anonymous
2,564.81
4.08
function instead using this anonymous
2,566.55
5.28
function as the value of the on submit
2,568.89
5.94
property of this form and so now what
2,571.83
5.1
I'd like to do is somehow get access to
2,574.83
4.35
whatever the user typed into the input
2,576.93
4.29
field whatever the user's name happens
2,579.18
4.14
to be and so I could get the input field
2,581.22
5.49
by a document dot query selector input
2,583.32
5.88
and that would work this time but we'll
2,586.71
3.81
want to start to be a little bit careful
2,589.2
2.97
because on this page there are multiple
2,590.52
3.18
different input elements as an input
2,592.17
3.54
element here for typing in the name and
2,593.7
5.16
a second input element here for telling
2,595.71
4.86
me giving me a button where I can submit
2,598.86
4.08
this particular HTML form and so what I
2,600.57
4.5
probably want to do is be a little bit
2,602.94
4.44
more specific and it turns out that
2,605.07
4.41
inside of query selector I can use all
2,607.38
4.53
of the standard ways in CSS that we
2,609.48
5.04
could select for a particular element so
2,611.91
5.01
in CSS if you'll recall we had the
2,614.52
4.8
ability to run CSS and just say style
2,616.92
4.95
all the h1 or we could say style all the
2,619.32
4.29
things with this particular ID or with
2,621.87
3.93
this particular class and document our
2,623.61
4.2
query selector works the same way that I
2,625.8
4.41
can say document query selector and pass
2,627.81
5.31
in a tag to say like get me the h1
2,630.21
4.8
element or get me the button or get me
2,633.12
3.99
the form but if there are multiple h1
2,635.01
3.54
elements are multiple buttons and
2,637.11
3.21
multiple forms I can be more specific
2,638.55
2.28
than that
2,640.32
3.9
if for example an element has an ID in
2,640.83
5.43
which case I can say document query
2,644.22
4.56
selector and then in quotation marks the
2,646.26
5.34
hash mark and then the name of the ID to
2,648.78
4.35
say get me the element with that
2,651.6
3.75
particular ID again using the exact same
2,653.13
5.4
syntax that CSS uses if I want to apply
2,655.35
5.64
a particular set of styles to only one
2,658.53
5.64
element that only has one ID likewise
2,660.99
5.49
two I can say document query selector
2,664.17
4.92
and then use dot followed by the name of
2,666.48
4.41
a class if there's a particular
2,669.09
3.93
particular class of elements and I want
2,670.89
4.5
to just get one of those and to say get
2,673.02
4.53
me an element that has this particular
2,675.39
4.5
class in order to manipulate it as well
2,677.55
4.23
so the same types of syntax that we
2,679.89
4.23
could use in CSS for trying to reference
2,681.78
5.22
and get at a particular HTML element we
2,684.12
4.86
can do the same thing here with document
2,687
2.64
query so
2,688.98
3.72
to go ahead and try and get a particular
2,689.64
5.07
element based on its tag name based on
2,692.7
4.5
this ID or based on its class and it was
2,694.71
4.44
for that reason that inside of the HTML
2,697.2
5.7
page for my input I gave the input an
2,699.15
6.719
idea of name I wanted some way to be
2,702.9
5.219
able to uniquely reference it and I can
2,705.869
4.531
uniquely reference it not by input but
2,708.119
5.341
by pound name where I can say get me the
2,710.4
6.24
element that has an ID of name and that
2,713.46
4.409
is the element that I would like to
2,716.64
3.619
extract inside of my JavaScript code
2,717.869
5.041
once I have that HTML element what I
2,720.259
4.121
want is like what the user actually
2,722.91
4.109
typed into that input field and it turns
2,724.38
4.05
out that if you have an input field in
2,727.019
3.72
HTML I can get access to what the user
2,728.43
5.129
typed in by accessing its value property
2,730.739
4.921
value is a property that fur that refers
2,733.559
4.351
to what it is the user actually typed in
2,735.66
6.389
so I can say dot value and I'm going to
2,737.91
5.669
go ahead and save that inside of a
2,742.049
3.121
variable so I could say something like
2,743.579
4.2
let name equal whatever the user typed
2,745.17
4.8
in but if I'm not going to reassign name
2,747.779
3.691
to something else inside of this
2,749.97
3.149
function inside of this function I'm
2,751.47
3.149
really going to get the name once and
2,753.119
2.94
I'm not gonna change it inside of the
2,754.619
3.9
function so I can use a constable
2,756.059
4.171
instead that would be better designed to
2,758.519
3.51
say I have a constant variable called
2,760.23
3.9
name which is equal to document query
2,762.029
4.171
selector get me the element whose ideas
2,764.13
5.879
name and get access to its value and now
2,766.2
5.849
I can display an alert I can alert
2,770.009
5.911
something like in backticks hello comma
2,772.049
6.48
and then using the dollar sign curly
2,775.92
4.5
brace syntax I can say plug in the name
2,778.529
4.851