事件处理,js会了点,vue好像又不会了,vue怎么好像搞得比js在事件处理上更复杂?

这段代码怎样用vue实现?

<html>
    <head>   
        <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
        <script type="text/javascript"> 
        
            function display_alert() 
            {
    
     
                alert('hamimelon!')   
            }
    </script>
    </head>
    <body>
        <input type="button" onclick = "display_alert()" value="wo shi yige " />
    </body>
</html>

猜你喜欢

转载自blog.csdn.net/weixin_40945354/article/details/115238827
今日推荐