如何使用mysql从php中的jquery自动完成框中获取字符串数据

时间:2017-02-05 04:03:02

标签: php jquery mysql

<script>

$(document).ready(function(){

    var spinner = $( "#spinner" ).spinner();

    $('#spinner').autocomplete({
        source:'name.php'
    });
    $( "#getvalue" ).on( "click", function() {
      alert( spinner.spinner( "value" ) );
    });
});
</script>

<body>

<label for="spinner">To search name type here:=</label> 
<input id="spinner" name="value"/>
<p>
  <button id="getvalue">Get value</button>
</p>
</body>[1]

enter image description here

上面是输出的快照,我希望从获取值按钮点击此下拉列表中获取特定值,上面是jQuery代码和html代码。

1 个答案:

答案 0 :(得分:0)

可以像这样提取微调器字段的值:

Traceback (most recent call last):
  File "main.py", line 260, in <module>
    main()
  File "main.py", line 165, in main
    gameLoop()
  File "main.py", line 192, in gameLoop
    player.end()
  File "main.py", line 133, in end
    win()
TypeError: 'Text' object is not callable