Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
有人在场。对于IE、Firefox和Chrome,唯一一致的行为是,如果只包含没有标签的值,就会得到一个值列表。我想知道,在这个特定示例中,一些兼容性问题是否与选项标记有关,而不是使用结束标记或结束斜杠?例:只是一个想法。我看到的另一个问题是,HTML5实_Html_Html Select_Html Input - Fatal编程技术网

有人在场。对于IE、Firefox和Chrome,唯一一致的行为是,如果只包含没有标签的值,就会得到一个值列表。我想知道,在这个特定示例中,一些兼容性问题是否与选项标记有关,而不是使用结束标记或结束斜杠?例:只是一个想法。我看到的另一个问题是,HTML5实

有人在场。对于IE、Firefox和Chrome,唯一一致的行为是,如果只包含没有标签的值,就会得到一个值列表。我想知道,在这个特定示例中,一些兼容性问题是否与选项标记有关,而不是使用结束标记或结束斜杠?例:只是一个想法。我看到的另一个问题是,HTML5实,html,html-select,html-input,Html,Html Select,Html Input,有人在场。对于IE、Firefox和Chrome,唯一一致的行为是,如果只包含没有标签的值,就会得到一个值列表。我想知道,在这个特定示例中,一些兼容性问题是否与选项标记有关,而不是使用结束标记或结束斜杠?例:只是一个想法。我看到的另一个问题是,HTML5实体的公认答案解决了这个问题(至少在我测试的Chrome中),下拉列表中的值只过滤到与键入的文本匹配的选项。至少在我的应用程序中,即使输入了一些文本,我仍然希望能够看到完整的选项列表。我使用的是HTML5实体,但为了解决这个问题,我将切换java


有人在场。对于IE、Firefox和Chrome,唯一一致的行为是,如果只包含没有标签的值,就会得到一个值列表。我想知道,在这个特定示例中,一些兼容性问题是否与选项标记有关,而不是使用结束标记或结束斜杠?例:
只是一个想法。我看到的另一个问题是,HTML5实体的公认答案解决了这个问题(至少在我测试的Chrome中),下拉列表中的值只过滤到与键入的文本匹配的选项。至少在我的应用程序中,即使输入了一些文本,我仍然希望能够看到完整的选项列表。我使用的是HTML5实体,但为了解决这个问题,我将切换javascript解决方案。这个插件是否支持任意(用户可选择的)“令牌”?至少演示没有建议:每当我键入预定义选项中不可用的内容时,文本字段失去焦点时,我的文本将自动删除。可能重复的可能重复如何限制用户键入?当用户单击文本框时,显示下拉列表values@GANI这并不是这种方法的真正意义。如果您不希望用户键入,那么只需使用标准的下拉列表即可。解决方案的要点是,当您希望允许用户键入自己的值时,特别是当您希望用户键入自己的值时。回答得好,但输入字段类型并不重要。@akauppi是的,因为它是“搜索”类型,所以您可以同时执行这两项操作-从列表中选择一个值或键入一个值,然后它将在列表中搜索。“它们在功能上与文本输入相同,但可能被用户代理设置为不同的样式。”-从您的第一个链接开始。@akauppi我不确定“功能上与文本输入相同”是什么意思。”.Text输入通常不添加数据列表。此答案似乎与onaclov2000的答案几乎相同-但使用此答案,您可以使用搜索,如果没有“type='search'”规范,这似乎是不可能的。
<!-- 
Most style elements I left to the CSS file, but some are here.
Reason being that I am actually calculating my width dynamically
in my application so when I dynamically formulate this HTML, I
want the width and all the factors (such as padding and border
width and margin) that go into determining the proper widths to
be controlled by one piece of code, so those pieces are done in
the in-line style.  Otherwise I leave the styling to the CSS file.
-->
<div class="data-list-input" style="width:190px;">
  <select class="data-list-input" style="width:190px;">
    <option value="">&lt;Free Form Text&gt;</option>
    <option value="Male">Male</option>
    <option value="Female">Female</option>
    <!-- Note that though the select/option allows for a different
    display and internal value, there is no such distinction in the
    text box, so for all the options (except the "none" option) the
    value and content of the option should be identical. -->
  </select>
  <input class="data-list-input" style="width:160px;padding:4px 6px;border-width:1px;margin:0;" type="text" name="sex" required="required" value="">
</div>
jQuery(function() {
  //keep the focus on the input box so that the highlighting
  //I'm using doesn't give away the hidden select box to the user
  $('select.data-list-input').focus(function() {
    $(this).siblings('input.data-list-input').focus();
  });
  //when selecting from the select box, put the value in the input box
  $('select.data-list-input').change(function() {
    $(this).siblings('input.data-list-input').val($(this).val());
  });
  //When editing the input box, reset the select box setting to "free
  //form input". This is important to do so that you can reselect the
  //option you had selected if you want to.
  $('input.data-list-input').change(function() {
    $(this).siblings('select.data-list-input').val('');
  });
});
div.data-list-input
{
    position: relative;
    height: 20px;
    display: inline-flex;
    padding: 5px 0 5px 0;
}
select.data-list-input
{
    position: absolute;
    top: 5px;
    left: 0px;
    height: 20px;
}
input.data-list-input
{
    position: absolute;
    top: 0px;
    left: 0px;
    height: 20px;
}
 <div style={{position:"relative",width:"200px",height:"25px",border:0,
              padding:0,margin:0}}>
    <select style={{position:"absolute",top:"0px",left:"0px",
                    width:"200px",height:"25px",lineHeight:"20px",
                    margin:0,padding:0}} onChange={this.onMenuSelect}>
            <option></option>
            <option value="starttime">Filter by Start Time</option>
            <option value="user"     >Filter by User</option>
            <option value="buildid"  >Filter by Build Id</option>
            <option value="invoker"  >Filter by Invoker</option>
    </select>
    <input name="displayValue" id="displayValue" 
           style={{position:"absolute",top:"2px",left:"3px",width:"180px",
                   height:"21px",border:"1px solid #A9A9A9"}}
           onfocus={this.select} type="text" onChange={this.onIdFilterChange}
           onMouseDown={this.onMouseDown} onMouseUp={this.onMouseUp} 
           placeholder="Filter by Build ID"/>
 </div>
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>jQuery UI Autocomplete - Scrollable results</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  <link rel="stylesheet" href="/resources/demos/style.css">
  <style>
  .ui-autocomplete {
    max-height: 100px;
    overflow-y: auto;
    /* prevent horizontal scrollbar */
    overflow-x: hidden;
  }
  /* IE 6 doesn't support max-height
   * we use height instead, but this forces the menu to always be this tall
   */
  * html .ui-autocomplete {
    height: 100px;
  }
  </style>
  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  <script>
  $( function() {
    var availableTags = [
      "ActionScript",
      "AppleScript",
      "Asp",
      "BASIC",
      "C",
      "C++",
      "Clojure",
      "COBOL",
      "ColdFusion",
      "Erlang",
      "Fortran",
      "Groovy",
      "Haskell",
      "Java",
      "JavaScript",
      "Lisp",
      "Perl",
      "PHP",
      "Python",
      "Ruby",
      "Scala",
      "Scheme"
    ];
    $( "#tags" ).autocomplete({
//      source: availableTags, // uncomment this and comment the following to have normal autocomplete behavior
      source: function (request, response) {
          response( availableTags);
      },
      minLength: 0
    }).focus(function(){
//        $(this).data("uiAutocomplete").search($(this).val()); // uncomment this and comment the following to have autocomplete behavior when opening
        $(this).data("uiAutocomplete").search('');
    });
  } );
  </script>
</head>
<body>

<div class="ui-widget">
  <label for="tags">Tags: </label>
  <input id="tags">
</div>


</body>
</html>
<datalist id="mylist">
   <option value="Option 1">
   <option value="Option 2">
   <option value="Option 3">
</datalist>
<input type="search" list="mylist">
<input list="browsers" name="browser" id="browser">
<datalist id="browsers">
  <option value="Edge">
  <option value="Firefox">
  <option value="Chrome">
  <option value="Opera">
  <option value="Safari">
</datalist>