To select an element by ID, JavaScript uses:
document.getElementById( " status " )
The ID must be passed without any selector prefixes (no dot, no hash).
Then, to update the text inside:
element.innerHTML = ' Completed ' ;
Why the others are wrong:
A uses " .status " which would match a CSS class, not an ID.
B incorrectly prepends #, which is used in CSS selectors but not in getElementById.
D attempts to use .Value with capital V, which is incorrect for DOM text; .value only applies to form elements.
Thus, option C is correct.
JavaScript Knowledge References (text-only)
getElementById takes a raw ID string with no prefixes.
innerHTML updates an element’s displayed HTML content.
==================================================
Submit