我正在使用laravel引导带形式的jquery,但是jquery没有给出建议
<div class="form-group">
<label>Email <span style="opacity: 0.5; font-style: italic;">(Required)</span></label>
<div class="input-group">
<input type="text" name="email" id="autocomplete" id="email" class="form-control input-lg />
<span id="error_email"></span>
@if($errors->has('email'))
<div class="alert alert-danger">
{{ $errors->first('email') }}
</div>
@endif
</div>
它是jquery
var options = ['@gmail.com', '@msn.com', '@yahoo.com'];
$("input#autocomplete").autocomplete({
source: options
});
$("input#autocomplete").keyup(function() {
var new_options = [];
for (var i = 0; i < options.length; i++)
new_options[i] = $(this).val() + options[i];
$(this).autocomplete( "option", "source", new_options);
});