<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">
function change(){
document.getElementById("daan").value=Math.floor(document.getElementById("shuru").value);
}
</script>
<style type="text/css">
*{font-size:18px; color:#F00;}
#shuru{background:#93C;}
button{background:#0F0;}
#daan{background:#FF0;}
</style>
</head>
<body>
<form>
<input type="text" placeholder="请输入数值" value="" id="shuru"/>
<!--在360浏览器中点击输入框,“请输入数值”不会消失,在ie中点击会消失,在DW写代码时,也会消失,这是兼容问题?-->
<button type="button" onclick="change()">Change</button>
<input type="text" placeholder="答案" value="" id="daan"/>
</form>
</body>
</html>