WZ22HAO 2015年12月08日
web计算器,在谷歌浏览器下数组的解释问题
IE和eclipse下显示是想要的结果,但是在google和搜狗下就不是,截图如下:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Calculator</title>
</head>
<body>
<div id="txtShow"
style="height:28px;font-size: x-large;">
<br />
<br />
</div>
<script type="text/javascript" src="button.js" charset="GB2312">
</script>
</body>
</html>

var name =new Array( "(", ")", "AC", "ON", "7", "8", "9", "+", "4", "5", "6", "-", "1",
"2", "3", "*", "0", ".", "=", "/" );
var count = 0;
var string = "";
var i, n = 0, j = 0, br = 0;
var num = new Array(100);
var op = new Array(100);
for (var count = 0; count < name.length; count++) {
br++;
document.write("<input type=\"button\" value=\""+ name[count]+ "\" style=\"height:50px;width:50px\" onclick=\"getVal(this.value)\"/>");
if (br == 4) {
br = 0;
document.write("<br\>");
}
}
...全文
61 点赞 收藏 5
写回复
5 条回复

还没有回复,快来抢沙发~

发动态
发帖子
JavaScript
创建于2007-09-28

5.1w+

社区成员

22.3w+

社区内容

Web 开发 JavaScript
社区公告
暂无公告