jQuery+html5点击刷新换一个验证码
1、新建html文档。

3、书写css代码。body { padding: 0; margin: 0; border: 0; co造婷用痃lor: #585858; font-size: 14px; }h1, h2, ul, li, input { margin: 0; padding: 0; border: none; list-style: none; text-decoration: none; }.ddetails-header { width: 100%; height: 700px; padding-top: 45px; background: #dff2ff; }.ddetails-con { margin: 190px auto; width: 960px; height: 278px; }.btn { float: left; display: block; text-align: center; text-decoration: none; list-style: none; vertical-align: middle; margin-top: 12px; margin-right: 21px; width: 120px; height: 42px; line-height: 42px; background: #008cff; border-radius: 3px; color: #fff; font-size: 16px; }.checkcode { float: left; margin-top: 10px; width: 182px; height: 42px; border: 1px solid #008cff; border-radius: 3px; background: #fff; }.checkcode input { float: left; text-align: center; width: 85px; height: 36px; padding: 3px; color: #000; }.checkcode canvas { float: right; width: 85px; height: 36px; padding: 3px; }.btn-code { margin-top: 10px; display: block; float: left; width: 95px; height: 42px; margin-left: 20px; background: #008cff; color: #fff; border-radius: 3px; }.btn-no { background: none; border: 1px solid #008cff; border-radius: 3px; color: #008cff; }.btn:hover { text-decoration: none; cursor: pointer; }

5、代码整体结构。
