Is there a JavaScript autoclaplet library that does not depend on any other libraries?
I'm not using JQuery or as a favorite, I'm making a mobile app that I need to keep extra lighting.
An original javascript example, which can be modified in an autocomplete control:
html & input = input type = "text" onkeyup = "changeInput (this.value)" & gt; & Lt; Div id = "result" & gt; & Lt; / Div & gt; javascript var people = ['Steven', 'Sean', 'Stephen', 'Sam', 'Nathan']; Function match people (input) {var reg = new regx (include input.plit (''). ('\\ w *'). Replace (/ \ w /, ""), 'i'); Return people Filter (function (person) {if (person.match (reg)) {return person;}}); } Function Changes Input (Val) {var Autocomplete = Match People (Val); Document.getElementById ("Results"). InnerHTML = Autocomplete results; }
& input = input type = "text" onkeyup = "changeInput (this.value)" & gt; & Lt; Div id = "result" & gt; & Lt; / Div & gt; javascript var people = ['Steven', 'Sean', 'Stephen', 'Sam', 'Nathan']; Function match people (input) {var reg = new regx (include input.plit (''). ('\\ w *'). Replace (/ \ w /, ""), 'i'); Return people Filter (function (person) {if (person.match (reg)) {return person;}}); } Function Changes Input (Val) {var Autocomplete = Match People (Val); Document.getElementById ("Results"). InnerHTML = Autocomplete results; }
Comments
Post a Comment