Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
    <div id="app">
        <div  @keyup.enter="submit1()" contenteditable="true">编辑我</div>
        <div tabindex="1" @keyup.enter="submit2()">点击我</div>
    </div>
    <script>
        new Vue({
            el: "#app",
            methods: {
                submit1:function() {
                    alert(123)
                },
                submit2:function() {
                    alert(456)
                }
            }
        })
    </script>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers