In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
这篇文章主要讲解了"jQuery怎么实现模拟12306城市选择框功能",文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习"jQuery怎么实现模拟12306城市选择框功能"吧!
具体如下:
www.jb51.net jQuery城市选择框 #parent{ width:500px; position:relative; } #text{ height:25px; } #select{ width:420px; height:185px; position:absolute; top:31px; left:0; background:#eeeeee; } .cities{ width:60px; height:25px; line-height:25px; margin:5px 5px 0 5px; float:left; text-align:center; font-family:'Times New Roman'; font-size:15px; cursor:pointer; } $(document).ready(function(){ $("#select").hide(); $("#text").focus(function(){ $("#select").show(); }); $(".cities").click(function(){ $("#text").val($(this).text()); $("#select").hide(); }); $("#text").blur(function(){ setTimeout(function(){ $("#select").hide(); }, 300); }); }); 乌鲁木齐 兰州 西宁 拉萨 呼和浩特 哈尔滨 长春 沈阳 三亚 北京 天津 太原 济南 银川 西安 郑州 南京 杭州 福州 广州 台北 南宁 昆明 成都 重庆 贵阳 长沙 南昌 合肥 武汉 上海 海口 香港 澳门
运行效果如下:
Thank you for reading, the above is "jQuery how to achieve simulation 12306 city selection box function" of the content, after the study of this article, I believe that everyone on jQuery how to achieve simulation 12306 city selection box function This problem has a deeper understanding, the specific use of the situation also needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.