【问题标题】:HTML Input Forms not displaying entire placeholder text; but includes the quote marks [duplicate]HTML 输入表单不显示整个占位符文本;但包括引号[重复]
【发布时间】:2014-05-28 23:35:58
【问题描述】:

我正在编写一个简单的输入表单,大部分文本输入设置为具有一些占位符文本。

无论出于何种原因,仅显示占位符文本的第一个连续文本字符串。引号也会显示。我试图弄清楚为什么会这样,并进行必要的更改(编码?转义字符?我的标记太糟糕了?)

我相信这很简单。我敢肯定这很荒谬。我提前道歉。

这是我的代码。感谢任何有想法的人。


<!DOCTYPE html>
<html lang="en" xmlns:og="http://ogp.me/ns#" class="layout-signup " >
  <head>
  <meta charset="UTF-8">
  <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0,  maximum-scale=1.0">
  <meta name="description" content="Feline Friends is a foster-based, no kill, cat rescue organization serving Chicago.">
  <meta name="keywords" content="feline, friends, online, cat, animal, shelter, pet, rescue, foster, volunteer, Chicago, Illinois">
  <meta property="og:title" content="Sign up  - Feline Friends">
  <meta property="og:type" content="website">
  <meta property="og:url" content="http://www.felinefriendschicago.org/fosterapply.html">
  <meta property="og:description" content="Feline Friends is a foster-based, no kill, cat rescue organization serving Chicago.">
  <title>Sign Up – Feline Friends</title>

      <link rel="icon" href="file:///Users/lieselhess/Documents/favicon.ico">
      <!--[if IE]><link rel="shortcut icon" href="file:///Users/lieselhess/Documents/favicon.ico"><![endif]-->


      <link rel="canonical" href="http://www.felinefriendschicago.org/fosterapply.html">

      <!--  <link rel="stylesheet" type="text/css" href="file:///Users/lieselhess/Documents/reboot.css" media="all"> -->


  </head>

  <p>
  You can request printable foster application forms by email from Toni McNaughton at         <a href="mailto:tonimcn@rcn.com?Subject=Foster%20Application%20Request" target="_top">tonimcn@rcn.com</a> or Lisa Ward at <a href="mailto:catladychicago@yahoo.com?Subject=Foster%20Application%20Request" target="_top">catladychicago@yahoo.com</a>
</p>

<strong class="line-thru">or</strong>
<p>


    </div>
  </form>
</section>

<section class="register">
  <div class="content">

    <h2 class="center hdr-l">
Apply for our foster program below:    </h2>

<form id=fosterapp>
<fieldset>
<legend>Contact Details</legend>
<ol>
<li>
<label for=name>Name</label>
<input id=name name=name type=text placeholder=”First and Last Name” required autofocus>
</li>
<li>
<label for=email>Email</label>
<input id=email name=email type=email placeholder=”example@domain.com” required>
</li>
<li>
<label for=homephone>Home Phone</label>
<input id=homephone name=homephone type=tel placeholder=”Eg. +7735551212” required>
</li>
<li>
<label for=workphone>Work Phone</label>
<input id=workphone name=workphone type=tel placeholder=”Eg. +7735551212”>
<input id=callwork name=qcallwork type=radio>
<label for=callwork>I may receive calls at work</label>
<input id=nocallwork name=qcallwork type=radio>
<label for=nocallwork>I may NOT receive calls at work</label>
</li>

</li>
<li>
<label for=address>Address</label>
<textarea id=address name=address rows=5 required></textarea>
</li>
</ol>
</fieldset>

<fieldset>
<legend>Household Information</legend>
<ol>
<li>
</ol>
</li>



</body>

</html>

【问题讨论】:

  • 您的引号在输入属性上看起来很奇怪。它们应该看起来像 class="line-through" 周围的那些。
  • @circusdei -- 是的。谢谢。在我的文本编辑器(Mac 版 Libre Office)中键入双引号字符会自动插入这些可怕的引号,我确信有人在某些时候认为它们“更漂亮”。我已经因为类似但不相关的问题放弃了 TextEdit。有没有像样的文本编辑器可以在 OS X 上编写 HTML?
  • 我喜欢 Notepad++,但我认为它只适用于 windows。
  • @MonkeyMoose — 很多。只要确保它是文本编辑器而不是文字处理器。 Sublime、Komodo、BBEdit、Emacs、GVim、TextMate、Eclipse,这个列表非常庞大。
  • 谢谢大家。你是最好的。这很有帮助。

标签: html forms input placeholder


【解决方案1】:

我解决了您的问题,现在所有占位符都可见。 检查这个:http://cssdesk.com/PWNzt

我认为问题出在你使用“insetead of”

【讨论】:

    猜你喜欢
    • 2023-03-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-31
    • 2013-01-15
    • 2013-12-28
    • 2022-01-21
    • 2023-02-15
    相关资源
    最近更新 更多