请教关于手机浏览器的优化问题
我写的这个计算器在PC上没问题
可是到了iPhone上 按键就有延迟了 Android上还没试
按键用的table布局
请教一下是为什么 需要怎么改进

可是到了iPhone上 按键就有延迟了 Android上还没试
按键用的table布局
请教一下是为什么 需要怎么改进

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>计算器</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div class="container">
<div class="screen">
<textarea id="inuptScreen"></textarea>
<!--输入面板-->
<input type="text" id="outputScreen" />
<!--结果面板-->
</div>
<div class="input">
<table>
<tr>
<td>
<input type="button" name="off" value="OFF" onclick="off()" />
</td>
<td>
<input type="button" name="del" value="DEL" onclick="del()" />
</td>
<td>
<input type="button" name="clr" value="CLR" onclick="clr()" />
</td>
<td>
<input type="button" name="pi" value="π" onclick="disp(this)" />
</td>
<td>
<input type="button" name="equal" value="=" onclick="equal()" />
</td>
</tr>
<tr>
<td>
<input type="button" name="seven" value="7" onclick="disp(this)" />
</td>
<td>
<input type="button" name="eight" value="8" onclick="disp(this)" />
</td>
<td>
<input type="button" name="nine" value="9" onclick="disp(this)" />
</td>
<td>
<input type="button" name="left_brackets" value="(" onclick="disp(this)" />
</td>
<td>
<input type="button" name="right_brackets" value=")" onclick="disp(this)" />
</td>
</tr>
<tr>
<td>
<input type="button" name="four" value="4" onclick="disp(this)" />
</td>
<td>
<input type="button" name="five" value="5" onclick="disp(this)" />
</td>
<td>
<input type="button" name="six" value="6" onclick="disp(this)" />
</td>
<td>
<input type="button" name="multiply" value="*" onclick="disp(this)" />
</td>
<td>
<input type="button" name="divide" value="/" onclick="disp(this)" />
</td>
</tr>
<tr>
<td>
<input type="button" name="one" value="1" onclick="disp(this)" />
</td>
<td>
<input type="button" name="two" value="2" onclick="disp(this)" />
</td>
<td>
<input type="button" name="three" value="3" onclick="disp(this)" />
</td>
<td>
<input type="button" name="add" value="+" onclick="disp(this)" />
</td>
<td>
<input type="button" name="subtract" value="-" onclick="disp(this)" />
</td>
</tr>
<tr>
<td>
<input type="button" name="zero" value="0" onclick="disp(this)" />
</td>
<td>
<input type="button" name="point" value="." onclick="disp(this)" />
</td>
<td>
<input type="button" name="square" value="x²" onclick="disp(this)" />
</td>
<td>
<input type="button" name="square" value="x^y" onclick="disp(this)" />
</td>
<td>
<input type="button" name="sqrt" value="√" onclick="disp(this)" />
</td>
</tr>
</table>
</div>
</div>
<script src="javascript.js"></script>
</body>
</html>* {
margin: 0;
padding: 0;
font-size: 16px;
outline: none;
/*消除Chrome中默认显示的input或textarea的边框*/
}
body {
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
-khtml-user-select: none;
user-select: none;
/*禁止被选中*/
}
div.container {
margin: 30px;
padding: 10px;
width: 350px;
background-color: black;
}
div.screen {
margin: 0 auto;
margin-top: 5px;
width: 340px;
font-size: 0;
/*消除行内元素之间的空隙*/
}
textarea#inuptScreen {
margin: 0 auto;
padding: 5px;
width: 330px;
height: 80px;
resize: none;
font: 24px 微软雅黑;
background-color: #b3f7e0;
border: none;
overflow: hidden;
}
input#outputScreen {
margin: 0 auto;
padding: 5px;
width: 330px;
resize: none;
font: 30px 微软雅黑;
background-color: #b3f7e0;
border: none;
overflow: hidden;
border-top: 2px solid black;
}
div.input {
margin: 0 auto;
margin-top: 20px;
width: 350px;
}
div.input table,
div.input tr,
div.input td {
border: none;
border-collapse: collapse;
}
div.input input {
margin: 5px;
width: 60px;
line-height: 50px;
height: 50px;
background-color: dimgray;
border: none;
color: white;
cursor: pointer;
}
...全文


