html输入onload不起作用

时间:2016-09-22 05:42:01

标签: javascript html input

每次在html页面中显示html输入元素时,我该怎么做?

<html>
    <head>
        <script>
            function myFunction() {
                alert("input is loaded");
            }
        </script>
    </head>

    <body >
        <h1>Hello</h1>
        <input type="text" onload="myFunction()"/> 
    </body>

</html>

https://jsfiddle.net/amj5w7y1/2/

0 个答案:

没有答案