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">