写JavaScript总是报错

请问我错在哪里了

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>


img

getElementById(e),getElementById(r) 你中间应该是一个字符串的 'e'或者‘r’