Associate Input Outside Form

Associate Input Outside Form

Hard HTML HTML Forms 26 views
Explanation Complexity

Problem Statement

Create a form and an input outside it using the form attribute.

Input Format

No input.

Output Format

Print the HTML code.

Constraints

Use matching form id.

Input / Output Format

Input Format
No input.
Output Format
Print the HTML code.
Constraints
Use matching form id.

Examples

Input:
Output:
(HTML code)

Example Solution (Public)

HTML
<!doctype html>
<html lang='en'>
<head>
  <meta charset='utf-8'>
  <meta name='viewport' content='width=device-width, initial-scale=1'>
  <title>meetcode</title>
</head>
<body>
  <form id='f1' action='#' method='post'>
    <button type='submit'>Send</button>
  </form>
  <input type='text' name='note' form='f1' value='meetcode'>
</body>
</html>

Official Solution Code

<!doctype html>
<html lang='en'>
<head>
  <meta charset='utf-8'>
  <meta name='viewport' content='width=device-width, initial-scale=1'>
  <title>meetcode</title>
</head>
<body>
  <form id='f1' action='#' method='post'>
    <button type='submit'>Send</button>
  </form>
  <input type='text' name='note' form='f1' value='meetcode'>
</body>
</html>
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.