Skip to content
Related Articles

Related Articles

HTML DOM Input week list Property

Improve Article
Save Article
  • Last Updated : 26 Aug, 2022
Improve Article
Save Article

The input week list property in HTML DOM is used to return the reference to the list element that contains an input week field.


Return value: It returns a string value that represents the value of the id attribute of the datalist element.

Example: Below HTML code is used to return the input week list property.  


<!DOCTYPE html>
    <title> HTML DOM Input Week list Property</title>
<body style="text-align:center;">
    <h1 style="color:green;">
    <h2>DOM Input Week list property</h2>
    <form id="formID">
        <input type="week" id="week_id"
            list="week_list" name="geeks"
        <datalist id="week_list">
            <option value="2021-W12" />
            <option value="2022-w23" />
            <option value="1999-W14" />
            <option value="2022-w15" />
            <option value="1998-W19" />
    <button onclick="btnclick()">
        Click Here!
    <p id="paraID" style="font-size:20px;"></p>
    <!-- Script returns the Input week list property  -->
        function btnclick() {
            var weeklistVar = document
                .innerHTML = weeklistVar;



Supported Browsers:

  • Google Chrome 20
  • Edge 12
  • Opera 11

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!