Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/forms/the-input-element/dynamic-value-update.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>Dynamically-created input displays value changes</title>
<link rel="match" href="dynamic-value-update-ref.html">
<p>There should be one input with "1" and one empty input.</p>
<div id="source"><input name="F01" value="1"></div>
<script>
const clone = document.createElement('div');
clone.innerHTML = document.getElementById('source').innerHTML;
document.body.appendChild(clone);
document.getElementsByName('F01')[1].value = '';
</script>