Jquery+javascript动态生成支付网页数字键盘
制作网页支付界面的时候,数字键盘适配不同的屏幕宽高比是一个很麻烦的事,所以我制作了一个根据屏幕宽高动态生成的数字键盘
运行截图:
实现代码
html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<meta content="email=no" name="format-detection">
<link rel="stylesheet" href="{
{你的css文件路径}}">
<title>动态数字键盘</title>
</head>
<body>
<div class="pay-top">
<img class="lklogo" src="img/lianke.png">
<div class="pay-shop-info">
<span class="shop-name">付款给:{
{付款对象名}}</span>
</div>
<div class="paymoneylogo">
<span>¥</span>
</div>
<label class="inputlabel" id="paymoney" type="text"></label>
</div>
<div class="payinfo">
<table cellspacing="0" cellpadding="0">
<tr>
<td class="paynum">1</td>
<td class="paynum">2</td>
<td class="paynum">3</td>
<td id="pay-return">
<div class=