不知道你是不是要这个
<!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=gb2312" />
<title>无标题文档</title>
<script>
function show()
{
var a1=document.getElementById("a1");
var a2=document.getElementById("a2");
var show=document.getElementById("show");
show.innerHTML="a1的值是:"+a1.value+"; a2的值是: "+a2.value;
}
</script>
</head>
<body>
<input name="a1" type="text" id="a1" />
<input name="a2" type="text" id="a2" />
<input type="button" name="Submit" value="按钮" onclick="show();" />
<div id="show"></div>
</body>
</html>