基于dom的xss攻击不能实现

<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <head>
        <title> DOM-XSS TEST </title>
        <style>
            #box{width:250px;height:200px;border:1px solid #e5e5e5;background:#f1f1f1;}
        </style>
    </head>
    <body>
        <script>
            window.onload= function(){
                var oBox=document.getElementById("box");
                var oSpan=document.getElementById("span1");
                var oText=document.getElementById("text1");
                var oBtn=document.getElementById("Btn");
                oBtn.onclick = function(){
                    oBox.innerHTML = oBox.innerHTML + oSpan.innerHTML + oText.value + "<br/>";
                    oText.value=""
                };
            }
        </script>

        <div id="box"></div>
        <span id="span1"> YOU:</span>
        <input type="text" id="text1">
        <input id="Btn" type="button" value="发送消息" name="">
    </body>
</html>

这是源码 然后我将<svg/onload=alert(1)>写入的时候没有成功 <script>alert(1)</script>这样的也不行,请教下各位大佬,问题出在哪里了呀,步骤感觉没有错呀 很苦恼 chorme 火狐 edge 都试过了都不行

好像确实不行,试了下只有IMG属性可以,你看看这个

https://blog.csdn.net/aptentity/article/details/70139622

但是 <img src=1 onerror=alert(1)>这样的代码就可以实现,是onload的问题吗?

script丢页面最下面好不,为啥你们script都喜欢写在上面