我正在使用本教程练习表单设计:TutsPlus
由于一些非常奇怪的原因,这些 HTML 的最后部分出现在 Textarea 元素中:
</li>
<li>
<button class="submit" type="submit">Submit Form</button>
</li>
</form>
</body>
</html>
我从教程中复制的完整脚本如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML5 Contact Form</title>
<link rel="stylesheet" media="screen" href="styles.css" >
</head>
<body>
<form class="contact_form" action="" method="post" name="contact_form">
<ul>
<li>
<h2>Contact Us</h2>
<span class="required_notification">* Denotes Required Field</span>
</li>
<li>
<label for="name">Name:</label>
<input type="text" name="name" />
</li>
</ul>
<li>
<label for="email">Email:</label>
<input type="text" name="email" />
<span class="form_hint">Proper format "name@something.com"</span>
</li>
<li>
<label for="website">Website:</label>
<input type="text" name="website" />
<span class="form_hint">Proper format "http://someaddress.com"</span>
</li>
<li>
<label for="message">Message:</label>
<textarea name="message" cols="40" rows="6" >
</li>
<li>
<button class="submit" type="submit">Submit Form</button>
</li>
</form>
</body>
</html>