我哪错了?
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8"/>
<title></title>
<script>
window.onload=function ()
{
var oTxt1=document.getElementById('txt1');
var oTxt2=document.getElementById('txt2');
var oBtn=document.getElementById('btn1');
oBtn.onclick=function ()
{
alert(oTxt1.value+oTxt2.value)
}
}
</script>
</head>
<body>
<input class="txt1" type="text"/>
<input class="txt2" type="text"/>
<input id="btn1" type="button" value="求和"/>
</body>
</html>