【问题标题】:not able to render response in firefox无法在 Firefox 中呈现响应
【发布时间】:2016-02-26 05:02:57
【问题描述】:

您好,我正在尝试在 html 下呈现

<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body >
    <select id="countrySelect" size="1">
        <option></option>
        <option>USA</option>
        <option>Singapore</option>
    </select>
    <button >show selected</button>
</body>
</html>

但在浏览器控制台中出现以下错误: 没有声明 HTML 文档的字符编码。如果文档包含 US-ASCII 范围之外的字符,则文档将在某些浏览器配置中呈现乱码。页面的字符编码必须在文档或传输协议中声明。

【问题讨论】:

  • 挑战究竟是什么?
  • 无论我在服务器上放什么,它都会返回空白的html页面,上面的错误显示在浏览器控制台中。
  • 它应该返回什么?
  • html 页面,但如果我查看源代码则为空白。
  • 连下拉都不行?你是什么版本的?

标签: html firefox


【解决方案1】:

请尝试下面的 Html 代码

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
       <title>Untitled Document</title>
      </head>
      <body>
        <select id="countrySelect" size="1">
          <option></option>
          <option>USA</option>
          <option>Singapore</option>
        </select>
        <button>show selected</button>
      </body>
 </html>

【讨论】:

  • 同样的结果,没有成功。
猜你喜欢
  • 1970-01-01
  • 2014-12-17
  • 2018-03-01
  • 1970-01-01
  • 1970-01-01
  • 2017-10-20
  • 1970-01-01
  • 2011-12-11
  • 1970-01-01
相关资源
最近更新 更多