<!DOCTYPE html>
<
html
>
<
head
>
<
title
>
HTML DOM Input DatetimeLocal list Property
</
title
>
</
head
>
<
body
style
=
"text-align: center;"
>
<
h1
>GeeksforGeeks</
h1
>
<
h2
>HTML DOM Input DatetimeLocal list Property</
h2
>
<
br
> Date Of Birth:
<
input
type
=
"datetime-local"
list
=
"DateTimeLocal_list"
id
=
"Test_DatetimeLocal"
>
<
datalist
id
=
"DateTimeLocal_list"
>
<
option
value
=
"2019-02-04T12:32:20.51"
>
<
option
value
=
"2019-02-04T12:32:20.51"
>
<
option
value
=
"2019-02-04T12:32:20.51"
>
<
option
value
=
"2019-02-04T12:32:20.51"
>
</
datalist
><
br
><
br
>
<
button
onclick
=
"My_DatetimeLocal()"
>
Click Here!
</
button
>
<
p
id
=
"result"
></
p
>
<
script
>
function My_DatetimeLocal() {
let x = document.getElementById(
"Test_DatetimeLocal").list.id;
document.getElementById("result").innerHTML = x;
}
</
script
>
</
body
>
</
html
>