我想使用jqueryui.com中的自動填充小部件(代碼如下) 正如您所看到的,他們正在使用外部樣式表來創建一個良好的樣式。用於自動填充小部件的CSS
如何更改「自動完成框」的樣式?什麼是id或課程?當然,自動完成建議沒有格式化。
<link rel="stylesheet" href="/resources/demos/style.css">
<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 = ["test1", "test2", "test3"];
$("#tags").autocomplete({
source: availableTags
});
});
</script>
</head>
<body>
<div class="ui-widget">
<label for="tags">Tags: </label>
<input id="tags">
</div>
</body>
</html>
詳細請看這裏:http://jqueryui.com/autocomplete/#default
是啊,謝謝! :) – Marcel