jQuery模拟12306城市选择框功能简单实现方法示例
(编辑:jimmy 日期: 2025/10/26 浏览:3 次 )
本文实例讲述了jQuery模拟12306城市选择框功能简单实现方法。分享给大家供大家参考,具体如下:
<!DOCTYPE html>
<html>
<head>
<title>www.jb51.net jQuery城市选择框</title>
<style>
#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;
}
</style>
<script src="/UploadFiles/2021-04-02/jquery.min.js">
运行效果如下:
感兴趣的朋友可以使用在线HTML/CSS/JavaScript代码运行工具:http://tools.jb51.net/code/HtmlJsRun 测试一下运行效果。
更多关于jQuery相关内容感兴趣的读者可查看本站专题:《jQuery常见事件用法与技巧总结》、《jQuery常用插件及用法总结》、《jQuery扩展技巧总结》、《jQuery常见经典特效汇总》及《jquery选择器用法总结》
希望本文所述对大家jQuery程序设计有所帮助。
下一篇:Bootstrap Table实现定时刷新数据的方法
