Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/78.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
Html 不可以安装Horsey插件_Html_Plugins - Fatal编程技术网

Html 不可以安装Horsey插件

Html 不可以安装Horsey插件,html,plugins,Html,Plugins,安装代码很简单,但不起作用。我做错了什么 <header> <div class='parent'> <input id='ig'/> <pre> <code> horsey(document.querySelector('input'), { source: [{ list: [ { value:

安装代码很简单,但不起作用。我做错了什么

<header>
   <div class='parent'>
      <input id='ig'/>
      <pre>
         <code> 
            horsey(document.querySelector('input'), {
               source: [{ list: [
                  { value: 'banana', text: 'Bananas from Amazon Rainforest' },
                  { value: 'apple', text: 'Red apples from New Zealand' },
                  { value: 'orange', text: 'Oranges from Moscow' },
                  { value: 'lemon', text: 'Juicy lemons from the rich Amalfitan Coast' }
               ]}],
               getText: 'text',
               getValue: 'value'
            });
         </code>
      </pre>
   </div>

   <script src="https://cdnjs.cloudflare.com/ajax/libs/horsey/4.0.1/horsey.min.js"></script>
   <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/horsey/4.0.1/horsey.min.css" media="all"> 
</header>

我在页面上只看到标准输入。

您必须编写如下代码:


horsey(document.getElementById('ig'){
资料来源:[{清单:[
{值:'香蕉',文本:'亚马逊雨林中的香蕉'},
{值:'apple',文本:'redapples from New Zealand'},
{值:'orange',文本:'Oranges from Moscow'},
{值:'lemon',文本:'Amalfitan海岸多汁的柠檬'}
]}],
getText:'text',
getValue:'值'
});
<script src="https://www.malketiya.com/listgrid/horsey.min.js"></script>
<input id='ig'/>
<script>
horsey(document.getElementById('ig'), {
source: [{ list: [
    { value: 'banana', text: 'Bananas from Amazon Rainforest' },
    { value: 'apple', text: 'Red apples from New Zealand' },
    { value: 'orange', text: 'Oranges from Moscow' },
    { value: 'lemon', text: 'Juicy lemons from Amalfitan Coast' }
]}],
getText: 'text',
getValue: 'value'
});
</script> 
<link rel="stylesheet" href="https://www.malketiya.com/listgrid/horsey.min.css" media="all">