0

我正在尝试自己添加文本来描述一些步骤,而表单中没有任何输入框。是否有可能做到这一点?应该只是文本的行是:

<p>For a new location please add an entry</p>

<p>我在没有标签的情况下尝试了它,但再次没有成功。抱歉,如果这看起来很简单,但我在 w3schools、这个网站或只是谷歌搜索上什么也没看到。

<form action="insert.php" method="post">
Name <input name="name" type="text">
<br>
Email address of user <input name="email" type="text">
<br>
Phone Number <input name="phone" type="text">
<br>
Town <input name="town" type="text">
<br>
County <select name="county">
<option>    Outside Ireland </option>
<option>    Antrim  </option>
<option>    Armagh  </option>
<br>
<p>For a new location please add an entry</p>
<br>
Name of New Location <input name="newlocation" type="text">
<br>
Name of Location <input name="location" type="text">
<br>
Link in Google Maps <input name="gmapslink" type="text">
<br>
<input type="submit">
</form>
4

2 回答 2

0

您可以使用该placeholder属性来完成此操作

<input
  type="text"
  name="ds_email"
  placeholder="Please, enter your e-mail here"
/>
于 2013-04-05T18:16:05.193 回答
0

你的意思是,在框中有一个预设的文本输入?我相信那将是 value="desired value:

前任。 input name="town" value="Text Desired" type="text"

于 2013-04-05T18:04:43.187 回答