请问我错在哪里了
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<script type="text/javascript">
window.onload=function (){
var e=document.getElementById(e)
function ii(){
var age=document.getElementById(r).value
alert(age)
}
e.onclick=ii()
}
</script>
<body>
<input type="text" name="" id="r" value="" />
<input type="submit" name="" id="e" value="添加" />
</body>
</html>