Kitsada Posted April 15, 2023 Posted April 15, 2023 I want to use datalist in html, I tried it and it doesn't work. image >> aatQKl.png (716×484) (img.in.th) <label for="reigster">Log in</label> <input type="text" class="input" placeholder="Username" id="user" list="username-list"> <datalist id="username-list"> <option value="John"> <option value="Doe"> <option value="Jane"> </datalist> <input type="text" class="input" placeholder="Password" id="pass"> <div class="btn-go btn-login">Log in</div> 1 minute ago, Kitsada said: I want to use datalist in html, I tried it and it doesn't work. image >> aatQKl.png (716×484) (img.in.th) <label for="reigster">Log in</label> <input type="text" class="input" placeholder="Username" id="user" list="username-list"> <datalist id="username-list"> <option value="John"> <option value="Doe"> <option value="Jane"> </datalist> <input type="text" class="input" placeholder="Password" id="pass"> <div class="btn-go btn-login">Log in</div>
Moderators IIYAMA Posted April 16, 2023 Moderators Posted April 16, 2023 On 15/04/2023 at 16:17, Kitsada said: I want to use datalist in html, I tried it and it doesn't work. I tested your code and it works fine. But keep in mind that in your current setup it is used as an auto complete feature. Typing `Jo` makes auto complete John available. Also when you press your arrow-down key, it should act more as the options tag as @FLUSHBICEPS referring to. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now