HTML 5 个带有图像的数据列表

HTML 5 datalist with image

我 google 它但运气不好。 如何在结果上添加图像?

<form action="/action_page.php" method="get">
  <input list="browsers" name="browser">
  <datalist id="browsers">
    <option value="Internet Explorer">
    <option value="Firefox">
    <option value="Chrome">
    <option value="Opera">
    <option value="Safari">
  </datalist>
  <input type="submit">
</form>

你不能。

per the specifications一样,datalist元素允许短语内容或零个或多个元素.

The datalist element can be used in two ways. In the simplest case, the datalist element has just option element children.

In the more elaborate case, the datalist element can be given contents that are to be displayed for down-level clients that don't support datalist. In this case, the option elements are provided inside a select element inside the datalist element.

在浏览器不支持 datalist 元素的情况下,您可以提供的措辞内容作为备份。