本文实例讲述了原生JS实现的双色球功能。分享给大家供大家参考,具体如下:
先来看看运行效果:
具体代码如下:
www.jb51.net - JS双色球 #datePicker { width: 100px; height: 30px; line-height: 30px;; border-radius: 10px; border: 1px solid #5098a5; text-align: center; cursor: pointer; } #number { height: 100px; float: left; margin-top: 20px; } #number span { display: block; width: 30px; height: 30px; line-height: 30px; text-align: center; border-radius: 30px; border: 2px solid red; color: red; font-weight: bold; float: left; margin-top: 15px; margin-right: 10px; } #buleBall { height: 100px; margin-top: 21px; float: left; } #buleBall span { display: block; width: 30px; height: 30px; line-height: 30px; text-align: center; border-radius: 30px; background-color: blue; color: white; font-weight: bold; float: left; margin-top: 15px; margin-right: 10px; } 点击按钮
PS:这里再为大家提供几款相关在线工具供大家参考使用:
在线随机数字/字符串生成工具:
http://tools.jb51.net/aideddesign/suijishu
在线随机字符/随机密码生成工具:
http://tools.jb51.net/aideddesign/rnd_password
在线随机数生成工具:
http://tools.jb51.net/aideddesign/rnd_num
在线随机生成个人信息数据工具:
http://tools.jb51.net/aideddesign/rnd_userinfo
更多关于Javascript相关内容感兴趣的读者可查看本站专题:《Javascript数学运算用法总结》、《Javascript数据结构与算法技巧总结》、《Javascript数组操作技巧总结》、《Javascript排序算法总结》、《Javascript遍历算法与技巧总结》、《Javascript查找算法技巧总结》及《Javascript错误与调试技巧总结》
希望本文所述对大家Javascript程序设计有所帮助。



