<!DOCTYPE html>
<
html
>
<
body
style
=
"text-align:center;"
>
<
h1
style
=
"color:green;"
>
GeeksforGeeks
</
h1
>
<
h2
> DOM Input Tel list property </
h2
>
<
legend
>
Phone Number:
<
input
type
=
"tel"
id
=
"mytel"
list
=
"telephone_list"
value
=
"6753682635"
autofocus>
</
legend
>
<
datalist
id
=
"telephone_list"
>
<
option
value
=
"87688965"
/>
<
option
value
=
"998347589"
/>
<
option
value
=
"99384339"
/>
<
option
value
=
"837494493"
/>
<
option
value
=
"8474748437"
/>
</
datalist
><
br
><
br
>
<
button
onclick
=
"btnclick()"
>
Click Here!
</
button
>
<
p
id
=
"paraID"
style
=
"font-size:20px"
></
p
>
<
script
>
function btnclick() {
var x = document.getElementById("mytel").list.id;
document.getElementById("paraID").innerHTML = x;
}
</
script
>
</
body
>
</
html
>