如何将2个本机HTML形式元素组合在一起

发布于 2025-02-04 23:05:52 字数 556 浏览 3 评论 0原文

我应该在看起来像这样的HTML,CSS和JS中编写代码,我确实知道它要求用户输入城市(在> textarea中)和在HTML中租用或购买(在中选择),但是如何使用CSS或JS或其他内容组合两者,尚不清楚。

我什至应该是本机HTML元素还是制作某种自定义元素? A 可满足的带有HTML选择的矩形div似乎有用,但是CSS为此代码提供的控制量也令人困惑。

另外,我也将根据键入的城市名称的城市名称进行自动完成,但是如何实施此功能也令人困惑。如果我选择一个API,则在continedable矩形的情况下它会起作用吗?考虑到样式要求,我应该使用诸如Algolia搜索之类的东西吗?

我在这里很难过,任何帮助都将不胜感激。

enter image description here

I am supposed to write code in html, css and js that looks like this, i do understand that it requires the user to enter a city (in a textarea) and rent or buy (in a select) in html, however how to combine the two using either css or js or something else remains unclear.

Should I even be the native html elements or make custom elements of some sort?
A contenteditable rectangular div with an html select seems useful but the amount of control that css gives for this code is also confusing.

Also i am tring to get autocomplete for the city name based off of the name of the city typed, however how to implement this is also confusing. If I choose an API, will it work in the case of a contenteditable rectangle? Should I use something like Algolia search considering the styling requirements?

I am stumped here, any help would be highly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文