Home > front end >  Is there a big js is very severe
Is there a big js is very severe

Time:03-20


<script> $(function () {var runset_name_list={{runset_name_list | safe}}; $(" # runset_name "). The autocomplete ({source: runset_name_list}); }); </script>

Have great god help look at it, why I use the following script, click on the input box wouldn't have input of recorded history, is the browser's built-in functions, such as online!!!!!

CodePudding user response:

Because you add the autocomplete

CodePudding user response:

You this is to use the autocomplete jquery UI plug-in, closed primary autocomplete the plug-in, and wrote,
You can look at the source of the autocomplete, internal have write the
 

$. Widgets (" UI. Autocomplete ", {
//...
_create: function () {
//...
Enclosing _addClass (" UI - autocomplete - input ");
Enclosing element. Attr (" autocomplete ", "off");
//...
}
})

CodePudding user response:

That I how both functions with it?? Can I click in the browser's own aotucomplete, when the input to use jquery

CodePudding user response:

This you see HTML & lt; Input> Tag autocomplete attribute

CodePudding user response:

reference dream time reply: 3/f
that I how both functions with it?? Can I click in the browser's own aotucomplete, when the input to use jquery


If you only need the default autocomplete feature, its initial effect should be in focus, so you can try to modify for: when input box content (such as keyup?) Just call autocomplete, of course, may in the blur or do you think the appropriate time to destroy the autocomplete, to restore the initial state,

CodePudding user response:

Yes, I guess when keyup call, but I want to double click on the input box to restore the initial state,
how do you write?The $(document). Ready (function () {

$(" input "). The keyup (function () {
$(function () {
The console. The log (availableTags);
$(" # tags "). The autocomplete ({
Source: availableTags
});
});
});
});
  • Related