这样怎么不行?
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Math </title>
<script type="text/javascript">
function dian(){
var i =document.getElementById("txt1").value;
var j =document.getElementById("txt2").value;
j =Math.ceil(i);
}
</script>
</head>
<body>
<form>
<input type="txt" name="文本" value="输入" id="txt1" /><br />
<input type="button" name="按钮" value="向上取整" onclick="dian()"/><br />
<input type="txt" name="文本" value="结果" id="txt2"/>
</form>
</body>
</html>